From owner-freebsd-hackers Tue Jan 1 11:58:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from protactinium.btinternet.com (protactinium.btinternet.com [194.73.73.176]) by hub.freebsd.org (Postfix) with ESMTP id 25C5D37B423; Tue, 1 Jan 2002 11:58:47 -0800 (PST) Received: from host217-36-17-56.in-addr.btopenworld.com ([217.36.17.56] helo=jrochester.org) by protactinium.btinternet.com with esmtp (Exim 3.22 #8) id 16LV3d-0004tA-00; Tue, 01 Jan 2002 19:58:45 +0000 Message-ID: <3C32150C.7000504@jrochester.org> Date: Tue, 01 Jan 2002 19:59:08 +0000 From: John Rochester User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011128 X-Accept-Language: en-us MIME-Version: 1.0 To: Stefan Esser Cc: hackers@FreeBSD.ORG Subject: Re: userland program panics freebsd 4.3 References: <20011231165828.D2301@StefanEsser.FreeBSD.org> <200112311631.fBVGVtZ45017@scanner.secnap.net> <20020101203614.A11265@StefanEsser.FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Stefan Esser wrote: >Instead of the for loop, I'd rather have: > > while(waitpid(pid, NULL, WNOHANG) == EINTR) > This should be while (waitpid(pid, NULL, WNOHANG) < 0 && errno == EINTR) > > /* do nothing */; > > return kill(pid, 0) == 0; > -- John Rochester Software Architect, Merus Software Ltd. Tel: +44 7870 174690 http://merus.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message