Current-Users archive

[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



    Date:        Sun, 6 Nov 2016 12:30:04 +0100
    From:        Nicolas Joly <njoly%pasteur.fr@localhost>
    Message-ID:  <20161106113004.GA7631%issan.sis.pasteur.fr@localhost>

  | Don't we need to report an error because of the "shall" wording in the
  | ERRORS section.

Possibly.   But read the similar text in the error list for waitpid()
(in the page for wait()) and compare that to the spec for ECHILD for
wait() itself (where there is no WNOHANG of course), and if the
interpretation is as simple as that, wonder about why the text in
the ECHILD case for waitpid() is so different.   And then note that
waitid() is really much more like waitpid() than the ancient wait()
(it has both pid and options args, like waitpid, whereas wait() has
neither.)   I'd have expected waitid() to have copied the waitpid()
ECHILD text (or something close to it) rather than the wait() text,
if the same meaning was intended.

We'll see what the posix experts say (probably not much before
sometime tomorrow (ie: Monday), US time).

kre



Home | Main Index | Thread Index | Old Index