Correctly test return value of pipe(2)

CID:		1393351
This commit is contained in:
bapt 2018-06-12 16:40:22 +00:00
parent 131d85c67f
commit dbe09b2df6

View File

@ -58,7 +58,8 @@ start_pr(char *file1, char *file2)
signal(SIGPIPE, SIG_IGN);
fflush(stdout);
rewind(stdout);
pipe(pfd);
if (pipe(pfd) == -1)
err(2, "pipe");
switch ((pid = pdfork(&pr_pd, PD_CLOEXEC))) {
case -1:
status |= 2;