From owner-freebsd-hackers Thu Oct 31 10:51:27 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA27595 for hackers-outgoing; Thu, 31 Oct 1996 10:51:27 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA27590 for ; Thu, 31 Oct 1996 10:51:25 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA25711; Thu, 31 Oct 1996 11:43:13 -0700 From: Terry Lambert Message-Id: <199610311843.LAA25711@phaeton.artisoft.com> Subject: Re: Zombie processes To: gjennejohn@frt.dec.com Date: Thu, 31 Oct 1996 11:43:13 -0700 (MST) Cc: ormonde@trem.cnt.org.br, hackers@FreeBSD.org In-Reply-To: <9610311315.AA16026@cssmuc.frt.dec.com> from "garyj@frt.dec.com" at Oct 31, 96 02:15:02 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > Is there any way to remove the zombie process from the system > > without blocking the parent process ? > > try using a handler for SIGCHLD and do the wait there. It might be > even better to use waitpid. Use waitpid, wait3, or wait4. Specify the option value WNOHANG, and the calls will return 0 if no processes are zombied. Alternately, set a signal handler of SIG_IGN for SIGCHLD. This is guaranteed to not create zombies in the first place for all POSIX compliant or conformant OS's. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.