summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>1998-07-08 14:10:55 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-07-09 01:48:16 +0000
commit85264bed4c82ceb468df539400cad6be9247659c (patch)
tree5d44069805047b4aa4f2c0d74fa1ff142c93f8a0 /util.c
parent3f52141186ba65ecaa67d62badb4a78b27920065 (diff)
downloadperl-85264bed4c82ceb468df539400cad6be9247659c.tar.gz
Allow $SIG{CHLD}='IGNORE' to work on Solaris
Message-ID: <19980708181055.A8005@perlsupport.com> p4raw-id: //depot/perl@1391
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.c b/util.c
index 81c4fa8a9e..afec3d3ba2 100644
--- a/util.c
+++ b/util.c
@@ -1957,6 +1957,10 @@ rsignal(int signo, Sighandler_t handler)
#ifdef SA_RESTART
act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
#endif
+#ifdef SA_NOCLDWAIT
+ if (signo == SIGCHLD && handler == (Sighandler_t)SIG_IGN)
+ act.sa_flags |= SA_NOCLDWAIT;
+#endif
if (sigaction(signo, &act, &oact) == -1)
return SIG_ERR;
else
@@ -1985,6 +1989,10 @@ rsignal_save(int signo, Sighandler_t handler, Sigsave_t *save)
#ifdef SA_RESTART
act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
#endif
+#ifdef SA_NOCLDWAIT
+ if (signo == SIGCHLD && handler == (Sighandler_t)SIG_IGN)
+ act.sa_flags |= SA_NOCLDWAIT;
+#endif
return sigaction(signo, &act, save);
}