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

Cyril Hrubis chrubis@suse.cz
Wed Apr 13 14:51:52 CEST 2016


Hi!
> -				tst_resm(TFAIL, "cannot open fork #%d", ikids);
> +				int i;
> +
> +				for (i = 1; i < ikids; i++)
> +					kill(pid[i], 9);
> +
> +				tst_brkm(TBROK|TERRNO, cleanup,
> +					 "cannot open fork #%d", ikids);

The problem is that the errno may get clobbered by the call to the
kill().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list