#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
#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);
}