On 9 November 2010 06:54, Otto Moerbeek <[email protected]> wrote:
> On Tue, Nov 09, 2010 at 08:17:59AM +0100, Markus Bergkvist wrote:
>
>> On 11/09/10 03:27, Philip Guenther wrote:
>> >On Mon, Nov 8, 2010 at 4:10 PM, Christiano F. Haesbaert
>> ><[email protected]>  wrote:
>> >>I must be doing something really silly but it seems waitpid ends up
>> >>returning -1 if WNOHANG is specified and there are no children to
>> >>reap.
>> >
>> >Umm, that's what the standard specifies.
>> >
>> >
>>
>> waitpid(2), RETURN VALUES
>> "Otherwise, if WNOHANG is specified and there are no stopped or
>> exited children, 0 is returned."
>
> And before the "Otherwise", it says:  "If there are no children not
> previously awaited, -1 is returned with errno set to [ECHILD]."
>
> To me this sentence is hard to understand, but I suspect the testcase
> hits this part.
>

Exactly, I got confused on this sentence and assumed the other way.

Sorry for the noise.

Reply via email to