From owner-freebsd-hackers Fri Aug 25 11:31:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 274D137B422 for ; Fri, 25 Aug 2000 11:31:52 -0700 (PDT) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=root) by scientia.demon.co.uk with esmtp (Exim 3.16 #1) id 13SNlG-000LkM-00; Fri, 25 Aug 2000 18:59:26 +0100 Received: (from ben@localhost) by strontium.scientia.demon.co.uk (8.9.3/8.9.3) id SAA21641; Fri, 25 Aug 2000 18:59:26 +0100 (BST) (envelope-from ben) Date: Fri, 25 Aug 2000 18:59:26 +0100 From: Ben Smithurst To: "'Alfred Perlstein'" Cc: "Yevmenkin, Maksim N, CSCIO" , core-ix@hushmail.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Preventing zombies to occure Message-ID: <20000825185926.D30144@strontium.scientia.demon.co.uk> References: <20000825062409.O1209@fw.wintelcom.net> <20000825175439.C30144@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000825175439.C30144@strontium.scientia.demon.co.uk> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 'Alfred Perlstein' wrote: > >> int >> sigchld_handler(int) >> { >> >> while (waitpid(-1, NULL, 0) || errno == EINTR) >> ; >> } actually, shouldn't you use WNOHANG when calling waitpid() there? What I normally do is int e = errno; while (waitpid(-1, NULL, WNOHANG) > 0) ; errno = e; But I think I'm drifting from the original point. -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message