forking and zombies in SYSV.

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Aug 21 04:57:31 AEST 1990


In article <1990Aug20.133107.12516 at lth.se> jh at efd.lth.se (Joergen Haegg) writes:
-How do I avoid getting this zombie?
-The only way, am I told, is to let the child fork again and exit.
-The parent will wait() for the first child, but not the child of 
-the first child.
-The second child will not create a zombie, because the parent 
-(the first child) is dead.
-This seems a bit silly, because /etc/init forks all the time and without
-any zombies. (Ok, init is maybe a little special :-)
-Is there not a cleaner way to do this?

No, and your comment about init is more than a bit silly.
init spends most of its time wait()ing for children,
both its own children and orphaned zombies.



More information about the Comp.unix.wizards mailing list