[LTP] [PATCH] syscalls/vhangup: convert to new lib, use direct syscall

Cyril Hrubis chrubis@suse.cz
Thu Jan 31 14:47:01 CET 2019


Hi!
> +	if ((pid = SAFE_FORK()) < 0) {
> +		tst_brk(TBROK | TTERRNO, "fork failed");

I've removed this pid < 0 check, since the whole point of SAFE_* macros
is that the call will either succeed or exit the test.

> +	} else if (pid > 0) {
> +		/* parent */
> +		waitpid(pid, NULL, 0);
> +	} else {
> +		/* child */

And also these useless /* parent */ and /* child */ comments.


And pushed, thanks!

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list