Re: pg_ctl is fragile

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_ctl is fragile
Дата
Msg-id 200211072248.gA7Mm8u15776@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_ctl is fragile  (Neil Conway <neilc@samurai.com>)
Список pgsql-bugs
Neil Conway wrote:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> > Doesn't seem like kill's exit code is going to tell you enough.
> > If you got, say, "Permission denied" rather than "No such process",
> > you shouldn't report that the postmaster isn't running.
>
> Ok, fair enough -- so is there any way to improve this behavior?

Seems we could grab some of kill's stderr and grep it for "No such":

    $ kill -0 32323
    bash: kill: (32323) - No such pid

Probably can't hurt.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: pg_ctl is fragile
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Cannot assign ROWTYPE, RECORD variables in PL/pgSQL