[LTP] [PATCH v2] Terminate leftover subprocesses when main test process crashes
Martin Doucha
mdoucha@suse.cz
Fri Feb 11 14:29:52 CET 2022
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.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list