[LTP] [PATCH v2] lib: shell: Fix timeout process races
Cyril Hrubis
chrubis@suse.cz
Wed Sep 22 11:31:55 CEST 2021
Hi!
> > > Agreed, that sounds like a great method.
> >
> > Should I send v3 or can I commit v2 with this change?
> >
>
> V3 please, I will help test it all.
Ok, will send ASAP.
> I just think of setsid(), is that works and better than setpgid(0, 0)?
For moving the process out of the process group setpgid() is enough, we
use it in the lib/tst_test.c for the fork_testrun() in order to track
all children of the test process as well.
I do not think that we need a new session here, that would probably have
strange side effects, for instance it would isolate the tst_timeout_kill
process from the terminal the tests were started in.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list