On Sun, Nov 06, 2016 at 04:39:00PM +0700, Robert Elz wrote:
>     Date:        Sun, 6 Nov 2016 09:34:17 +0100
>     From:        Nicolas Joly <[email protected]>
>     Message-ID:  <[email protected]>
> 
>   | Just encountered a case where wait(4) + WNOHANG do not fail with
>   | expected ECHILD when there is no process to wait.
> 
> See man 2 wait ...
> 
>      When the WNOHANG option is specified and no processes wish to report
>      status, wait4() returns a process id of 0.
> 
> If you specified WNOHANG it is not an error that there are no processes
> available, there are just no processes...

IMHO, this is an issue if you can't discriminate both cases : "there
is no process at all" vs. "processes exist but no one want to report
status".

-- 
Nicolas Joly

Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.

Reply via email to