Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Sep 1997 20:54:13 -0700
From:      David Greenman <dg@root.com>
To:        "Jamil J. Weatherbee" <jamil@counterintelligence.ml.org>
Cc:        Greg Lehey <grog@lemis.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: SIGCLD 
Message-ID:  <199709020354.UAA17302@implode.root.com>
In-Reply-To: Your message of "Mon, 01 Sep 1997 20:41:37 PDT." <Pine.BSF.3.96.970901203511.3844A-100000@counterintelligence.ml.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>what I am asking is if there is any differnce between
>
>  wait3 (&status, 0, (struct rusage *) NULL);
>
>and 
>
>  while (wait3(&status, WNOHANG, (struct rusage *) 0)>0);
>
>which is what stevens uses in his book.

   Yes, there is a difference. SIGCHLD signal delivery isn't reliable, so if
a SIGCHLD is missed, it is possible that more than one process needs to be
reaped. The first form will only reap on child, while the second form reaps
all of them. You want to use the second form.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709020354.UAA17302>