[LTP] [PATCH] waitpid/waitpid03: break test if fork failed

Cyril Hrubis chrubis@suse.cz
Tue Apr 12 17:52:41 CEST 2016


Hi!
> -				tst_resm(TFAIL, "cannot open fork #%d", ikids);
> +				tst_brkm(TBROK|TERRNO, cleanup,
> +					 "cannot open fork #%d", ikids);

I guess that we should kill any of the allready sleeping children at this point.

If we move the pid[] array to be global we can create a kill_children()
function to send a signal to all pids in pid[] that are > 0 and call it
if fork fails with SIGKILL as well as from the main loop with the
SIGTERM as well.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list