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

On 06.11.2016 12:54, Robert Elz wrote:
>     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() ...)
> kre

Please file a PR for it. I will reference it in ATF tests - I'm
preparing a combination of all possible cases.

Please make sure that all t_ptrace tests still pass.

I will extend t_ptrace as well, as there is an important case (in
attach1 use-case) to hold parent from seeing its child to exit, before
an attached debugger.

Attachment: signature.asc
Description: OpenPGP digital signature

Home | Main Index | Thread Index | Old Index