Specify SA_NOCLDSTOP when enabling SIGCHLD, per suggestion from
Oliver Jowett.
This commit is contained in:
parent
2284cfa255
commit
2820f05ef9
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user