diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-27 18:31:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-27 18:31:48 +0000 |
commit | 3e3f70a28ab05ec060fdbcd0bb5f819df57ba011 (patch) | |
tree | 69da2fe0faafb090c97f126312f23732b65974d2 /src/port/kill.c | |
parent | 1785acebf2ed14fd66955e2d9a55d77a025f418d (diff) |
Fix Windows emulation of kill(pid, 0). This will now succeed, but only
if the target PID is a PG postmaster or backend --- for our purposes that
is actually better than the Unix behavior. Per Dave Page and Andrew Dunstan.
Diffstat (limited to 'src/port/kill.c')
-rw-r--r-- | src/port/kill.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/port/kill.c b/src/port/kill.c index ebd07d95e6c..3ef2314f20a 100644 --- a/src/port/kill.c +++ b/src/port/kill.c @@ -9,7 +9,7 @@ * signals that the backend can recognize. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/kill.c,v 1.2 2004/06/24 18:53:48 tgl Exp $ + * $PostgreSQL: pgsql/src/port/kill.c,v 1.3 2004/08/27 18:31:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,8 @@ pgkill(int pid, int sig) BYTE sigRet = 0; DWORD bytes; - if (sig >= PG_SIGNAL_COUNT || sig <= 0) + /* we allow signal 0 here, but it will be ignored in pg_queue_signal */ + if (sig >= PG_SIGNAL_COUNT || sig < 0) { errno = EINVAL; return -1; |