Correctly test return value of pipe(2)
CID: 1393351
This commit is contained in:
parent
131d85c67f
commit
dbe09b2df6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user