[LTP] [PATCH] waitpid/waitpid02: check if fork failed

Cyril Hrubis chrubis@suse.cz
Tue Apr 12 12:05:36 CEST 2016


Hi!
>  		} else {
> +			if (pid < 0) {
> +				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
> +			}

The check should be done right after the fork() and not in the else
branch. Also there shoudln't be the curly braces around the tst_brkm()
since it's just a signle line.

Otherwise it's fine.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list