From 87b234e154b46ec357a8a2255e45df44ce58b6ca Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 6 Dec 2016 16:39:33 -0600 Subject: [PATCH] roken_detach_prep() close pipe --- lib/roken/detach.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/roken/detach.c b/lib/roken/detach.c index 2b8bc924c..f0499f1d2 100644 --- a/lib/roken/detach.c +++ b/lib/roken/detach.c @@ -129,6 +129,8 @@ roken_detach_prep(int argc, char **argv, char *special_arg) do { bytes = read(pipefds[0], buf, sizeof(buf)); } while (bytes == -1 && errno == EINTR); + (void) close(pipefds[0]); + pipefds[0] = -1; if (bytes == -1) { /* * No need to wait for the process. We've killed it. If it