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 13:07:45 +0100
    From:        Kamil Rytarowski <>
    Message-ID:  <>

  | 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.)


Home | Main Index | Thread Index | Old Index