1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2001-08-04 00:14:43 +00:00
parent 2b769c8212
commit dad8e410d0
6 changed files with 91 additions and 72 deletions

View File

@ -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);