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/postmaster | |
| 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/postmaster')
| -rw-r--r-- | src/backend/postmaster/postmaster.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index ccbffab5617..ada86268e38 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.362 2004/01/26 22:59:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.363 2004/01/27 00:45:26 momjian Exp $ * * NOTES * @@ -1566,7 +1566,7 @@ processCancelRequest(Port *port, void *pkt) ereport(DEBUG2, (errmsg_internal("processing cancel request: sending SIGINT to process %d", backendPID))); - kill(bp->pid, SIGINT); + pqkill(bp->pid, SIGINT); } else /* Right PID, wrong key: no way, Jose */ @@ -1738,7 +1738,7 @@ SIGHUP_handler(SIGNAL_ARGS) * will start a new one with a possibly changed config */ if (BgWriterPID != 0) - kill(BgWriterPID, SIGTERM); + pqkill(BgWriterPID, SIGTERM); } PG_SETMASK(&UnBlockSig); @@ -1772,7 +1772,7 @@ pmdie(SIGNAL_ARGS) * Wait for children to end their work and ShutdownDataBase. */ if (BgWriterPID != 0) - kill(BgWriterPID, SIGTERM); + pqkill(BgWriterPID, SIGTERM); if (Shutdown >= SmartShutdown) break; Shutdown = SmartShutdown; @@ -1806,7 +1806,7 @@ pmdie(SIGNAL_ARGS) * and exit) and ShutdownDataBase when they are gone. */ if (BgWriterPID != 0) - kill(BgWriterPID, SIGTERM); + pqkill(BgWriterPID, SIGTERM); if (Shutdown >= FastShutdown) break; ereport(LOG, @@ -1854,13 +1854,13 @@ pmdie(SIGNAL_ARGS) * properly shutdown data base system. */ if (BgWriterPID != 0) - kill(BgWriterPID, SIGQUIT); + pqkill(BgWriterPID, SIGQUIT); ereport(LOG, (errmsg("received immediate shutdown request"))); if (ShutdownPID > 0) - kill(ShutdownPID, SIGQUIT); + pqkill(ShutdownPID, SIGQUIT); if (StartupPID > 0) - kill(StartupPID, SIGQUIT); + pqkill(StartupPID, SIGQUIT); if (DLGetHead(BackendList)) SignalChildren(SIGQUIT); ExitPostmaster(0); @@ -2130,7 +2130,7 @@ CleanupProc(int pid, (errmsg_internal("sending %s to process %d", (SendStop ? "SIGSTOP" : "SIGQUIT"), (int) bp->pid))); - kill(bp->pid, (SendStop ? SIGSTOP : SIGQUIT)); + pqkill(bp->pid, (SendStop ? SIGSTOP : SIGQUIT)); } } else @@ -2225,7 +2225,7 @@ SignalChildren(int signal) (errmsg_internal("sending signal %d to process %d", signal, (int) bp->pid))); - kill(bp->pid, signal); + pqkill(bp->pid, signal); } curr = next; |
