aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-08-04 00:14:43 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-08-04 00:14:43 +0000
commitdad8e410d0c4329ec68392c442e1f9dafc8ec17c (patch)
tree5e512caa61cd99f2968ff3707c9e058d5760e118 /src/backend/bootstrap
parent2b769c82126eeb87eb02a6c1a301beb4edd14407 (diff)
downloadpostgresql-dad8e410d0c4329ec68392c442e1f9dafc8ec17c.tar.gz
postgresql-dad8e410d0c4329ec68392c442e1f9dafc8ec17c.zip
Fix handling of SIGCHLD, per recent pghackers discussion: on some
platforms system(2) gets confused unless the signal handler is set to SIG_DFL, not SIG_IGN. pgstats.c now uses pqsignal() as it should, not signal(). Also, arrange for the stats collector process to show a reasonable ID in 'ps', rather than looking like a postmaster.
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r--src/backend/bootstrap/bootstrap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 7fc54779680..56009217090 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.112 2001/07/16 05:06:57 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.113 2001/08/04 00:14:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -310,13 +310,15 @@ BootstrapMain(int argc, char *argv[])
pqsignal(SIGINT, SIG_IGN); /* ignore query-cancel */
pqsignal(SIGTERM, die);
pqsignal(SIGQUIT, quickdie);
+ pqsignal(SIGALRM, SIG_IGN);
+ pqsignal(SIGPIPE, SIG_IGN);
pqsignal(SIGUSR1, SIG_IGN);
pqsignal(SIGUSR2, SIG_IGN);
/*
* Reset some signals that are accepted by postmaster but not here
*/
- pqsignal(SIGCHLD, SIG_IGN);
+ pqsignal(SIGCHLD, SIG_DFL);
pqsignal(SIGTTIN, SIG_DFL);
pqsignal(SIGTTOU, SIG_DFL);
pqsignal(SIGCONT, SIG_DFL);