aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-06-14 19:59:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-06-14 19:59:24 +0000
commit823ab922951a4ee15c1ca3d142a8f63547b8b5b4 (patch)
tree2293797f6c29e9a435c299fc63d7605d9f2612e7
parent16ea152b7ec63e087c0a3e387405d01d9ab0f5d6 (diff)
downloadpostgresql-823ab922951a4ee15c1ca3d142a8f63547b8b5b4.tar.gz
postgresql-823ab922951a4ee15c1ca3d142a8f63547b8b5b4.zip
Add missing PG_SETMASK(&BlockSig) to SIGHUP_handler().
-rw-r--r--src/backend/postmaster/postmaster.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 2eca6babb07..1a71378a2e3 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -28,7 +28,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.219 2001/06/12 22:54:05 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.220 2001/06/14 19:59:24 tgl Exp $
*
* NOTES
*
@@ -1408,10 +1408,14 @@ SIGHUP_handler(SIGNAL_ARGS)
{
int save_errno = errno;
- if (Shutdown > SmartShutdown)
- return;
- got_SIGHUP = true;
- SignalChildren(SIGHUP);
+ PG_SETMASK(&BlockSig);
+
+ if (Shutdown <= SmartShutdown)
+ {
+ got_SIGHUP = true;
+ SignalChildren(SIGHUP);
+ }
+
errno = save_errno;
}
@@ -1567,13 +1571,10 @@ static void
reaper(SIGNAL_ARGS)
{
int save_errno = errno;
-
#ifdef HAVE_WAITPID
int status; /* backend exit status */
-
#else
union wait status; /* backend exit status */
-
#endif
int exitstatus;
int pid; /* process id of dead backend */