Fix fork() return value check.

This commit is contained in:
Sam Hocevar
2010-01-12 23:54:25 +00:00
committed by sam
parent e88488fcf0
commit 920ba80caa
+1 -1
View File
@@ -156,7 +156,7 @@ static int run_process(struct opts *opts, int pipes[][2])
#if defined HAVE_FORK
/* Fork and launch child */
pid = fork();
if(pid < -1)
if(pid < 0)
perror("fork");
if(pid != 0)
return pid;