[LTP] [PATCH v2] Terminate leftover subprocesses when main test process crashes

Li Wang liwang@redhat.com
Sat Feb 12 04:03:51 CET 2022


On Fri, Feb 11, 2022 at 9:30 PM Martin Doucha <mdoucha@suse.cz> wrote:

> On 11. 02. 22 13:55, Cyril Hrubis wrote:
> > Hi!
> >> --- a/lib/tst_test.c
> >> +++ b/lib/tst_test.c
> >> @@ -1495,6 +1495,9 @@ static int fork_testrun(void)
> >>              return TFAIL;
> >>      }
> >>
> >> +    if (tst_test->forks_child)
> >> +            kill(-test_pid, SIGKILL);
> >> +
> >
> > Maybe we can even print a message here if the kill() returns with 0,
> > which would mean that there were any leftover child processes killed.
>
> Feel free to add a message during merge.
>

I added that and applied. Thanks~


-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220212/f725038e/attachment.htm>


More information about the ltp mailing list