aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/diff/pr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/diff/pr.c b/usr.bin/diff/pr.c
index eaf6e37f9f4fb..ce8620e143243 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;