Xref: utzoo comp.unix.ultrix:3080 comp.unix.wizards:21197 Path: utzoo!attcan!uunet!cs.utexas.edu!uwm.edu!ogicse!unmvax!unmvax.cs.unm.edu!mike From: mike@turing.cs.unm.edu (Michael I. Bushnell) Newsgroups: comp.unix.ultrix,comp.unix.wizards Subject: Re: How to clear zombie children while parent still alive. Message-ID: Date: 27 Mar 90 18:45:57 GMT References: <1642@jimi.cs.unlv.edu> <10333@cbmvax.commodore.com> <1657@jimi.cs.unlv.edu> <1990Mar27.164632.18462@ux1.cso.uiuc.edu> Sender: news@unmvax.cs.unm.edu (The News service) Reply-To: mike@unmvax.cs.unm.edu Organization: University of No Money, Albuquerque, New Mexico Lines: 13 In-Reply-To: long@castor.csg.uiuc.edu's message of 27 Mar 90 16:46:32 GMT You clear zombie children *only* by exiting (clearly out) or by doing a wait(). Ignoring SIGCHLD doesn't change that, nor arrange to have init clean them up. What you want to do is have a signal handler for SIGCHLD that loops on wait3() (nonblocking) until there are no more exited children to collect. -mib -- Michael I. Bushnell \ This above all; to thine own self be true LIBERTE, EGALITE, FRATERNITE \ And it must follow, as the night the day, mike@unmvax.cs.unm.edu /\ Thou canst not be false to any man. CARPE DIEM / \ Farewell: my blessing season this in thee!