[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wait4(2) do not fail with WNOHANG if there is no child
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 <njoly%pasteur.fr@localhost>
> Message-ID: <20161106083417.GA6284%issan.sis.pasteur.fr@localhost>
> | 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
Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.
Main Index |
Thread Index |