Re: pg_ctl is fragile

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_ctl is fragile
Date: 2002-11-07 22:48:08
Message-ID: 200211072248.gA7Mm8u15776@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Neil Conway wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2002-11-07 22:57:09 Re: Cannot assign ROWTYPE, RECORD variables in PL/pgSQL
Previous Message Neil Conway 2002-11-07 22:46:22 Re: pg_ctl is fragile