Subject: Re: waitpid(2) oddity
To: None <current-users@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: current-users
Date: 11/27/2007 14:57:05
On Tue, Nov 27, 2007 at 08:16:37PM +0100, Joerg Sonnenberger wrote:
> On Tue, Nov 27, 2007 at 01:07:29PM -0600, David Young wrote:
> > if (waitpid(hsw->hsw_pid, &status, WNOHANG) == -1) {
> > loglib_warn("%s: waitpid", __func__);
>
> You don't handle waitpid() == 0 here, right? Otherwise status can be
> left uninitialised.
You are absolutely right. Thanks for taking a look, Joerg.
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933 ext 24