roken_detach_prep() close pipe

This commit is contained in:
Nicolas Williams
2016-12-06 16:39:33 -06:00
parent d609264a00
commit 87b234e154

View File

@@ -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