aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-08-13 14:18:57 +0200
committerLeah Neukirchen <leah@vuxu.org>2019-08-13 14:18:57 +0200
commit37646aff7c9cbc9bf0eff409842791524da047b3 (patch)
tree7b961db74e82e37ae3e0e46e760ef636edc231cf
parent3effe431731cc5f091eca1086da31fc4b61fbab2 (diff)
downloadreap-37646aff7c9cbc9bf0eff409842791524da047b3.tar.gz
reap-37646aff7c9cbc9bf0eff409842791524da047b3.tar.xz
reap-37646aff7c9cbc9bf0eff409842791524da047b3.zip
check pipe2
-rw-r--r--reap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/reap.c b/reap.c
index 90b2162..03386f1 100644
--- a/reap.c
+++ b/reap.c
@@ -108,7 +108,8 @@ main(int argc, char *argv[]) {
pid_t pid, desc;
int pipefd[2];
- pipe2(pipefd, O_CLOEXEC);
+ if (pipe2(pipefd, O_CLOEXEC) < 0)
+ F("pipe2");
pid = fork();
if (pid == 0) { // in child