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 15:13, Robert Elz wrote:
>     Date:        Sun, 6 Nov 2016 13:07:45 +0100
>     From:        Kamil Rytarowski <n54%gmx.com@localhost>
>     Message-ID:  <acc66609-045d-48f6-55e6-24ef217e15a0%gmx.com@localhost>
> 
> 
>   | Please file a PR for it.
> 
> Will do.
> 
>   | I will reference it in ATF tests - I'm
>   | preparing a combination of all possible cases.
> 
> Sounds good.
> 
>   | Please make sure that all t_ptrace tests still pass.
> 
> Currently, with my modified kernel, it is failing (probebly expectedly:
> the waitpid(WNONHANG) that is done in the parent when the child has
> stopped, before exiting (before the debugger has allowed it to exit).
> Everything else (the t_wait tests, the rest of t_ptrace - at least up
> to where it fails, and Nicolas' wait4 (to which I have added a whole
> bunch more cases testing wait4() (and implicitly wait() wait3() and waitpid())
> and wait6() and waitid() (while waitid() is implemented via wait6()
> its return values are not identical, so I thought that worth explicitly
> testing) and all of those cases work (the modified wait4.c also now
> creates a child, waits(WNOHANG) before it exits, and then waits for it
> to exit using (one of) wait4() wait6() or waitid() - all of those tests
> seem to be doing what we want.
> 
> So, it is just the stopped process (when we are not the debugger) that
> is failing now.
> 
> I believe I see what is happening there, but have to work out a clean way
> to fix it (what the test is expecting is what I believe should happen.)
> 
> kre
> 

Thank you for your investigation.

I'm right now working on t_ptrace extension testing all wait(2)
variations. My tests for t_wait are ready and I'm going to commit them now.

Thank you for PR.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index