diff --git a/src/backend/libpq/pqsignal.c b/src/backend/libpq/pqsignal.c index 468c062aa4..289f43a98e 100644 --- a/src/backend/libpq/pqsignal.c +++ b/src/backend/libpq/pqsignal.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.34 2004/05/29 22:48:19 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.35 2004/08/15 05:25:10 tgl Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other @@ -159,6 +159,10 @@ pqsignal(int signo, pqsigfunc func) act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; +#ifdef SA_NOCLDSTOP + if (signo == SIGCHLD) + act.sa_flags |= SA_NOCLDSTOP; +#endif if (sigaction(signo, &act, &oact) < 0) return SIG_ERR; return oact.sa_handler; diff --git a/src/interfaces/libpq/pqsignal.c b/src/interfaces/libpq/pqsignal.c index dca69cd727..59654149b4 100644 --- a/src/interfaces/libpq/pqsignal.c +++ b/src/interfaces/libpq/pqsignal.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.20 2004/02/02 00:11:31 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.21 2004/08/15 05:25:10 tgl Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other @@ -35,6 +35,10 @@ pqsignal(int signo, pqsigfunc func) act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; +#ifdef SA_NOCLDSTOP + if (signo == SIGCHLD) + act.sa_flags |= SA_NOCLDSTOP; +#endif if (sigaction(signo, &act, &oact) < 0) return SIG_ERR; return oact.sa_handler;