From 7adfbc33bfe82f49fc228669c1d1c605679f544a Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 7 Aug 2015 18:41:57 +0200 Subject: nq: check pipe(2) for errors. --- nq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nq.c b/nq.c index 21a0a5b..86177f3 100644 --- a/nq.c +++ b/nq.c @@ -122,7 +122,10 @@ usage: goto wait; } - pipe(pipefd); + if (pipe(pipefd) < 0) { + perror("pipe"); + exit(111); + }; /* first fork, parent exits to run in background. */ child = fork(); -- cgit 1.4.1