RE: gzip zombie / spawned from init

From: Chad Kitching
Date: Tue Jun 14 2005 - 11:09:01 EST


From: Nico Schottelius
>
>Well, wait waitpid(-1, ...) cannot be used, as there are many other
>children (the system is booting up at the time the gzip process
>becomes a zombie).
>
try waitpid(-1, &status, WNOHANG)

You will need to implement this in your replacement init because
one of init's jobs is to wait on unparented zombie tasks. In the
sysvinit package, see chld_handler() in init.c which handles the
SIGCHLD signal.

Basically, I believe all you need to do is waitpid() in the SIGCHLD
handler until you get a 0 return code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/