This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] support: Kill process group for test failure
On Thu, Feb 20, 2020 at 10:05 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Adhemerval Zanella:
>
> > Some testcases that create multiple subprocesses might abort or exit
> > prior waiting for their children. In such case, support_test_main
> > does not try to kill the spawned test process group (as in the
> > test timeout case).
>
> Does this actually work? Is the process group preserved if a process is
> reparented to init?
No, you are right.
There is a race too which I didn't see.
Once you waitpid the pid and pgid might be free for reuse and we can't
guarantee this will work.
Cheers,
Carlos.