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

Jan Vornberger Jan.Vornberger at Informatik.Uni-Oldenburg.DE
Mon Jun 7 16:02:08 EDT 2010

On Sun, Apr 11, 2010 at 09:03:13PM +0200, Tomas Janousek wrote:
> Sun Apr 11 20:55:10 CEST 2010  Tomas Janousek <tomi at nomi.cz>
>   * 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. :-)


More information about the xmonad mailing list