[LTP] 72b1728674 causing regressions [ [PATCH v2] Terminate leftover subprocesses when main test process crashes]

Cyril Hrubis chrubis@suse.cz
Fri Feb 18 15:48:34 CET 2022


Hi!
> > I guess that it's a race between the SETSID() and exit(0) in the
> > move_to_background() function. If the main test process calls exit(0)
> > before the newly forked child managed to do SETSID() it's killed by the
> > test library because it's still in the old process group.
> 
> Thanks!  Yep, it'll probably be a race.
> 
> Your patch causes server being killed:
> tst_test.c:1511: TBROK: Test killed by SIGUSR1!
> 
> (no big surprise)

Ah right, we have to set up a dummy handler for SIGUSR1 since default
handler for SIGUSR1 will terminate the process.

Or set the .needs_checkpoints in the tst_test structure and use WAKE and
WAIT pair to synchronize.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list