Skip to content

Commit 2820f05

Browse files
committed
Specify SA_NOCLDSTOP when enabling SIGCHLD, per suggestion from
Oliver Jowett.
1 parent 2284cfa commit 2820f05

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/backend/libpq/pqsignal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.34 2004/05/29 22:48:19 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.35 2004/08/15 05:25:10 tgl Exp $
1313
*
1414
* NOTES
1515
* This shouldn't be in libpq, but the monitor and some other
@@ -159,6 +159,10 @@ pqsignal(int signo, pqsigfunc func)
159159
act.sa_flags = 0;
160160
if (signo != SIGALRM)
161161
act.sa_flags |= SA_RESTART;
162+
#ifdef SA_NOCLDSTOP
163+
if (signo == SIGCHLD)
164+
act.sa_flags |= SA_NOCLDSTOP;
165+
#endif
162166
if (sigaction(signo, &act, &oact) < 0)
163167
return SIG_ERR;
164168
return oact.sa_handler;

src/interfaces/libpq/pqsignal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.20 2004/02/02 00:11:31 momjian Exp $
12+
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.21 2004/08/15 05:25:10 tgl Exp $
1313
*
1414
* NOTES
1515
* This shouldn't be in libpq, but the monitor and some other
@@ -35,6 +35,10 @@ pqsignal(int signo, pqsigfunc func)
3535
act.sa_flags = 0;
3636
if (signo != SIGALRM)
3737
act.sa_flags |= SA_RESTART;
38+
#ifdef SA_NOCLDSTOP
39+
if (signo == SIGCHLD)
40+
act.sa_flags |= SA_NOCLDSTOP;
41+
#endif
3842
if (sigaction(signo, &act, &oact) < 0)
3943
return SIG_ERR;
4044
return oact.sa_handler;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy