Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: forking and zombies in SYSV. Message-ID: <13629@smoke.BRL.MIL> Date: 20 Aug 90 18:57:31 GMT References: <1990Aug19.210351.24632@dde.dk> <1990Aug20.133107.12516@lth.se> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14 In article <1990Aug20.133107.12516@lth.se> jh@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.