diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-07 18:41:57 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-07 18:41:57 +0200 |
commit | 7adfbc33bfe82f49fc228669c1d1c605679f544a (patch) | |
tree | f52466454b95a20177ff4a81783bee4e5c797e5e | |
parent | 18fc98c42e4308ec3e3c149858c328b61010987c (diff) | |
download | nq-7adfbc33bfe82f49fc228669c1d1c605679f544a.tar.gz nq-7adfbc33bfe82f49fc228669c1d1c605679f544a.tar.xz nq-7adfbc33bfe82f49fc228669c1d1c605679f544a.zip |
nq: check pipe(2) for errors.
-rw-r--r-- | nq.c | 5 |
1 files changed, 4 insertions, 1 deletions
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(); |