darcs patch: get rid of zombies in a more portable way

Sun Apr 11 20:55:10 CEST 2010 Tomas Janousek

On Sun, Apr 11, 2010 at 09:03:13PM +0200, Tomas Janousek wrote:
Sun Apr 11 20:55:10 CEST 2010 Tomas Janousek
* get rid of zombies in a more portable way FreeBSD and OpenBSD don't support the signal(SIGCHLD, SIG_IGN) way of dealing with them. Wikipedia quote on the issue:
"POSIX.1-2001 allows a parent process to elect for the kernel to automatically reap child processes that terminate by setting the disposition of SIGCHLD to SIG_IGN or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal; Linux 2.6 kernels adhere to this behavior while FreeBSD supports only the latter of these methods. Because of historical differences between System V and BSD behaviors with regard to ignoring SIGCHLD, calling wait remains the most portable paradigm for cleaning up after forked child processes."
A quick patch review: I played around with this and it seems to work fine in my testings and is a sound alternative to the current way of just ignoring the signal. If this solves issues for FreeBSD and OpenBSD I'm all for it. My thumbs up for applying this, Don and Spencer. :-) Regards! Jan

Jan.Vornberger:
On Sun, Apr 11, 2010 at 09:03:13PM +0200, Tomas Janousek wrote:
Sun Apr 11 20:55:10 CEST 2010 Tomas Janousek
* get rid of zombies in a more portable way FreeBSD and OpenBSD don't support the signal(SIGCHLD, SIG_IGN) way of dealing with them. Wikipedia quote on the issue:
"POSIX.1-2001 allows a parent process to elect for the kernel to automatically reap child processes that terminate by setting the disposition of SIGCHLD to SIG_IGN or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal; Linux 2.6 kernels adhere to this behavior while FreeBSD supports only the latter of these methods. Because of historical differences between System V and BSD behaviors with regard to ignoring SIGCHLD, calling wait remains the most portable paradigm for cleaning up after forked child processes."
A quick patch review: I played around with this and it seems to work fine in my testings and is a sound alternative to the current way of just ignoring the signal. If this solves issues for FreeBSD and OpenBSD I'm all for it. My thumbs up for applying this, Don and Spencer. :-)
Interesting. Thanks for taking the time to check this.

Perhaps Jan could be given commit bit...
~d
Quoting Don Stewart
Jan.Vornberger:
On Sun, Apr 11, 2010 at 09:03:13PM +0200, Tomas Janousek wrote:
Sun Apr 11 20:55:10 CEST 2010 Tomas Janousek
* get rid of zombies in a more portable way FreeBSD and OpenBSD don't support the signal(SIGCHLD, SIG_IGN) way of dealing with them. Wikipedia quote on the issue:
"POSIX.1-2001 allows a parent process to elect for the kernel to automatically reap child processes that terminate by setting the disposition of SIGCHLD to SIG_IGN or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal; Linux 2.6 kernels adhere to this behavior while FreeBSD supports only the latter of these methods. Because of historical differences between System V and BSD behaviors with regard to ignoring SIGCHLD, calling wait remains the most portable paradigm for cleaning up after forked child processes."
A quick patch review: I played around with this and it seems to work fine in my testings and is a sound alternative to the current way of just ignoring the signal. If this solves issues for FreeBSD and OpenBSD I'm all for it. My thumbs up for applying this, Don and Spencer. :-)
Interesting. Thanks for taking the time to check this. _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

On Sun, Apr 11, 2010 at 09:03:13PM +0200, Tomas Janousek wrote:
Sun Apr 11 20:55:10 CEST 2010 Tomas Janousek
* get rid of zombies in a more portable way FreeBSD and OpenBSD don't support the signal(SIGCHLD, SIG_IGN) way of dealing with them. Wikipedia quote on the issue:
"POSIX.1-2001 allows a parent process to elect for the kernel to automatically reap child processes that terminate by setting the disposition of SIGCHLD to SIG_IGN or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal; Linux 2.6 kernels adhere to this behavior while FreeBSD supports only the latter of these methods. Because of historical differences between System V and BSD behaviors with regard to ignoring SIGCHLD, calling wait remains the most portable paradigm for cleaning up after forked child processes."
I confirm that I was afflicted with this issue, and this patch fixed it for me. Thanks!
participants (5)
-
Don Stewart
-
Jan Vornberger
-
Jeremy O'Brien
-
Tomas Janousek
-
wagnerdm@seas.upenn.edu