Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!sdd.hp.com!hplabs!hpfcso!hpfcdc!rml From: rml@hpfcdc.HP.COM (Bob Lenk) Newsgroups: comp.unix.wizards Subject: Re: forking and zombies in SYSV. Message-ID: <5980067@hpfcdc.HP.COM> Date: 23 Aug 90 23:11:07 GMT References: <1990Aug20.133107.12516@lth.se> Organization: HP Fort Collins, Co. Lines: 25 Several people have suggested signal(SIGCLD, SIG_IGN); While this does prevent zombies from being formed in System III, System V, and compatible systems, there are some reasons to avoid it: 1) Portability. This does not work in all implementations (notably not in BSD). It is not required by POSIX, XPG, or even the SVID. 2) Possible side-effects. This can impact any part of your program that creates children, including library calls that might create children for reasons unknown to you. It can impact the programs exec'd by descendents if they create children. Most code that creates children expects to wait for them. This can cause such code to hang (until all your children have died) and/or to get unexpected errors (possibly missing out on important status information). It is generally worth waiting for child processes in some way. Bob Lenk rml@fc.hp.com {uunet,hplabs}!fc.hp.com!rml