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 11:53:06 +0100
    From:        Kamil Rytarowski <>
    Message-ID:  <>

  | I will extend our ATF tests to validate it.

That's good.   But test for getting ECHILD from waitpid() - it is fairly
clear that is what should happen.

I am currently testing a fix, but I won't commit it (if it works)
until I hear from the austin group people (posix spec maintainers)
on what is intended for waitid() so if needed, it can be adjusted too.

From reading the spec, it may be that 0 is correct from waitid(), it may
be that ECHILD is correct, and if an incorrect pid is passed (which is
also ECHILD from waitpid() - test that one as well .. just specify any > 0
pid arg to waitpid() when the process has no children) it may be that
waitid() is supposed to return EINVAL (just to be different from waitpid() ...)


Home | Main Index | Thread Index | Old Index