From: Chip Salzenberg Date: Wed, 8 Jul 1998 18:10:55 +0000 (-0400) Subject: Allow $SIG{CHLD}='IGNORE' to work on Solaris X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=85264bed4c82ceb468df539400cad6be9247659c;p=p5sagit%2Fp5-mst-13.2.git Allow $SIG{CHLD}='IGNORE' to work on Solaris Message-ID: <19980708181055.A8005@perlsupport.com> p4raw-id: //depot/perl@1391 --- diff --git a/util.c b/util.c index 81c4fa8..afec3d3 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); }