diff options
author | Bruce Momjian | 2004-01-27 00:45:26 +0000 |
---|---|---|
committer | Bruce Momjian | 2004-01-27 00:45:26 +0000 |
commit | 50491963cb6e439f09e4ade608c0c177ed6e6527 (patch) | |
tree | ecf63f05e07665bd493eff04a463b1350ad07742 /src/backend/port/sysv_sema.c | |
parent | eec08b95e74b6065efa5bc1ea5fd5844e7a95bbd (diff) |
Here's the latest win32 signals code, this time in the form of a patch
against the latest shapshot. It also includes the replacement of kill()
with pqkill() and sigsetmask() with pqsigsetmask().
Passes all tests fine on my linux machine once applied. Still doesn't
link completely on Win32 - there are a few things still required. But
much closer than before.
At Bruce's request, I'm goint to write up a README file about the method
of signals delivery chosen and why the others were rejected (basically a
summary of the mailinglist discussions). I'll finish that up once/if the
patch is accepted.
Magnus Hagander
Diffstat (limited to 'src/backend/port/sysv_sema.c')
-rw-r--r-- | src/backend/port/sysv_sema.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 20f0d6bc514..82d6ded95ba 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.12 2003/12/01 22:15:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.13 2004/01/27 00:45:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,6 +31,7 @@ #include "miscadmin.h" #include "storage/ipc.h" #include "storage/pg_sema.h" +#include "libpq/pqsignal.h" #ifndef HAVE_UNION_SEMUN @@ -232,7 +233,7 @@ IpcSemaphoreCreate(int numSems) continue; /* oops, GETPID failed */ if (creatorPID != getpid()) { - if (kill(creatorPID, 0) == 0 || + if (pqkill(creatorPID, 0) == 0 || errno != ESRCH) continue; /* sema belongs to a live process */ } |