Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!agate!howland.reston.ans.net!cs.utexas.edu!uunet!zib-berlin.de!ceres.fokus.gmd.de!nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!mpifr-bonn.mpg.de!fs1.mpifr-bonn.mpg.de!souva From: souva@aibn58.astro.uni-bonn.de (Ignatios Souvatzis) Subject: Re: fork() Questions. In-Reply-To: Mike Mood's message of 26 Jan 1995 21:03:26 GMT Message-ID: <SOUVA.95Jan28202516@aibn58.astro.uni-bonn.de> Sender: news@mpifr-bonn.mpg.de Nntp-Posting-Host: aibn58 Reply-To: isouvatzis@astro.uni-bonn.de Organization: Radioastronomisches Institut der Universitaet Bonn, Bonn, FRG References: <3g92mu$9dl@outer.net> Date: Sat, 28 Jan 1995 19:25:16 GMT Lines: 27 In article <3g92mu$9dl@outer.net> Mike Mood <mgmood@tulum.com> writes: A few quick questions about a daemon I am trying to write. In which: The parent does not need to wait for the child to finish. It mearly hands off a socket to the child. 1) After a child process is terminated [exit(0)] why do I still have a zombie process existing? 2) Is there a better way to kill a child process than exit()? 3) Would it be better if the child issues an exec*() after the fork()? The zombie exists to store the exit status. It goes away as soon as the dead process has been wait()ed for. If the parent process exists and hasn't wait()ed, the zombie hangs around. If the parent process goes away w/o having wait()ed, the init process becomes the new parent process, and init() waits for anything to die, so your process will go away at that time. Regards, Ignatios SOuvatzis -- Ignatios Souvatzis (also ignatios@cs.uni-bonn.de) Cute quote: "Although on the plus side, I'll have to note that Eunice did a better job of emulating BSD UNIX on VAX/VMS than Sun's compatability packages do on Solaris 2.x." (davidb@ce.washington.edu)