[PATCH] support: Kill process group for test failure

Carlos O'Donell carlos@redhat.com
Thu Feb 20 15:12:00 GMT 2020


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.



More information about the Libc-alpha mailing list