Avoid non-portable signal(SIGCHLD, SIG_IGN)
j at uriah.heep.sax.de
Tue Apr 15 15:51:01 CDT 2003
As Alexandre Julliard wrote:
> > So i still think we should at least have the patch in the FreeBSD
> > port... (Btw., the reason why i stumpled across it when i saw that
> > code was that it reminded me of zombies i've once seen for a Wine
> > application, but i didn't track it down by that time.)
> Of course it can be put in the FreeBSD port, but it would be nicer to
> have a fix in the main tree, there are probably other BSDs that have
> the same problem.
No idea about the other BSDs, i had to review their sources for this.
> It just needs to be done in a way that doesn't break
> Linux, but that should be feasible.
It really surprises me why someone would implement signal(SIGCHLD,
SIG_IGN) that way yet not implement SA_NOCLDWAIT in sigaction() (which
is basically the same thing, only that the signal() thing is much
older while sigaction() is the cleaner reimplementation).
Note that SIGCHLD is ignored by default anyway, so historically,
setting it to SIG_IGN was just a no-op. It was SVR3 that introduced
that `don't generate zombies' feature, and the way they did it is that
you had to (explicitly) ignore an already (implicitly) ignored
signal... Doesn't this sound strange? ;-) SVR3 didn't have
sigaction(), so that's been their way out.
Of course, in SVR3 speak, one had to spell that SIGCLD, too. :)
I don't mind whether it's done in the generic sources or just in the
FreeBSD port though.
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
More information about the wine-devel