Quote:
Originally Posted by Perderabo
Probably the correct solution would involve a much more complex design. But here is something easily implemented that might be worth a try.
This freebsd man page says that freebsd supports the System V sigcld sematics. So just turn on SA_NOCLDWAIT and then no zombies should ever exist.
Thnx for advice, but
neither first construction nor second work properly - zombies still continue to stay
1st:
sig_act.sa_handler = SIG_IGN;
sig_act.sa_flags = SA_NOCLDWAIT;
sigemptyset(&sig_act.sa_mask);
sigaction(SIGCHLD, &sig_act, NULL);
2nd:
sig_act.sa_handler = SIG_IGN;
sig_act.sa_flags = SA_NOCLDWAIT;
sigfillset(&sig_act.sa_mask);
sigaction(SIGCHLD, &sig_act, NULL);