diff --git a/usr.bin/diff/pr.c b/usr.bin/diff/pr.c index eaf6e37f9f4..ce8620e1432 100644 --- a/usr.bin/diff/pr.c +++ b/usr.bin/diff/pr.c @@ -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;