From owner-freebsd-hackers Thu Oct 31 05:25:02 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA02728 for hackers-outgoing; Thu, 31 Oct 1996 05:25:02 -0800 (PST) Received: from mail12.digital.com (mail12.digital.com [192.208.46.20]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA02717 for ; Thu, 31 Oct 1996 05:24:59 -0800 (PST) From: garyj@frt.dec.com Received: from cssmuc.frt.dec.com by mail12.digital.com (8.7.5/UNX 1.5/1.0/WV) id IAA17673; Thu, 31 Oct 1996 08:15:10 -0500 (EST) Received: from localhost by cssmuc.frt.dec.com; (5.65v3.2/1.1.8.2/14Nov95-0232PM) id AA16026; Thu, 31 Oct 1996 14:15:02 +0100 Message-Id: <9610311315.AA16026@cssmuc.frt.dec.com> X-Mailer: exmh version 1.6.4 10/10/95 To: ormonde@trem.cnt.org.br (Rodrigo Ormonde) Cc: hackers@freebsd.org In-Reply-To: Message from ormonde@trem.cnt.org.br (Rodrigo Ormonde) of Thu, 31 Oct 96 10:01:15 -0300. Reply-To: gjennejohn@frt.dec.com Subject: Re: Zombie processes Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Oct 96 14:15:02 +0100 X-Mts: smtp Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk ormonde@trem.cnt.org.br writes: > Hi. > > I'm writing a server process that opens a socket for listen and every time > a new connection arrives the process is forked and the child deals with the > client. > Everything is working fine, except for the fact that when the child > processes exit they become zombies. Every time a new connection is establishe -d > and finished there is a new zombie process. I can't execute a wait() on the > parent process because it has to listen to new connections and can't be block -ed > on the wait() call. > Is there any way to remove the zombie process from the system without > blocking the parent process ? > > Please send answers directly to me, I'm not on the list. > > Thanks in advance. try using a handler for SIGCHLD and do the wait there. It might be even better to use waitpid. --- Gary Jennejohn (work) gjennejohn@frt.dec.com (home) Gary.Jennejohn@munich.netsurf.de (play) gj@freebsd.org