From 85264bed4c82ceb468df539400cad6be9247659c Mon Sep 17 00:00:00 2001 From: Chip Salzenberg Date: Wed, 8 Jul 1998 14:10:55 -0400 Subject: [PATCH] Allow $SIG{CHLD}='IGNORE' to work on Solaris Message-ID: <19980708181055.A8005@perlsupport.com> p4raw-id: //depot/perl@1391 --- util.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); } -- 1.8.3.1