From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 31 07:43:49 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF39916A4CE for ; Thu, 31 Mar 2005 07:43:49 +0000 (GMT) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43DFF43D5E for ; Thu, 31 Mar 2005 07:43:49 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j2V7hlX1013046 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 31 Mar 2005 17:43:48 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j2V7hl7l075694; Thu, 31 Mar 2005 17:43:47 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j2V7hliV075693; Thu, 31 Mar 2005 17:43:47 +1000 (EST) (envelope-from pjeremy) Date: Thu, 31 Mar 2005 17:43:47 +1000 From: Peter Jeremy To: zean zean Message-ID: <20050331074347.GF71384@cirb503493.alcatel.com.au> References: <20050330115132.N76928@skutsje.san.webweaving.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: the best form to wait the finish of execution of a child... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 07:43:50 -0000 On Wed, 2005-Mar-30 16:06:55 -0400, zean zean wrote: >Dirk-Willem My idea is to avoid all the processes zombies. thanks by >the recommendation. If you just want to avoid zombies and don't care about the return status, you can set SIGCHLD to SIG_IGN with SA_NOCLDWAIT (see sigaction(2)) and not have to use wait() at all. Note that if you don't bother to wait() for children and don't otherwise keep track of how many children you have, you can run into overload problems if you start creating children faster than they complete. -- Peter Jeremy