*BSD News Article 79321


Return to BSD News archive

From: James Brister <brister@vix.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: What is a zombie?
Date: 26 Sep 1996 17:52:19 -0700
Organization: Internet Software Consortium
Lines: 22
Sender: brister@bb.home.vix.com
Message-ID: <yy3sp84230c.fsf@bb.home.vix.com>
References: <52a5dt$qef@vixen.cso.uiuc.edu> <3249D8F7.2EA39DDA@lambert.org>
	<52cmr1$59b@vixen.cso.uiuc.edu>
NNTP-Posting-Host: bb.home.vix.com
X-Newsreader: Gnus v5.3/Emacs 19.34
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!pumpkin.pangea.ca!chronos.syr.edu!www.nntp.primenet.com!nntp.primenet.com!cam-news-hub1.bbnplanet.com!news.mathworks.com!newsfeed.internetmci.com!in1.uu.net!brighton.openmarket.com!decwrl!sonysjc!vixie!not-for-mail

dannyman@arh0135.urh.uiuc.edu (Dannyman) writes:

> 
> Terry Lambert (terry@lambert.org) wrote:
> 
> : Look at the parent program for the problem.
> 
> 	I actually got a real cool explanation in email. Basically what it
> is is that a program program calls exit() without wait() leaving a zombie
> child behind. The zombie takes up no resources, as it's done and is simply
> waiting around to be reaped, like a lost sould.

Not quite. Terry was right: the child calls exit(), but the parent doesn't
call wait() or ignore SIGCHLD and is still running. If the parent exits,
then any subprocesses will be re-parented to the init process, and it
(init) will do the necessary wait() call when appropriate. The zombie uses
a process table entry, so it is taking up some resources.

James
-- 
James Brister                                            brister@vix.com
Internet Software Consortium                             inn@isc.org