提交 2820f05e 编写于 作者: T Tom Lane

Specify SA_NOCLDSTOP when enabling SIGCHLD, per suggestion from

Oliver Jowett.
上级 2284cfa2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册