From a102c46d379565ccc19efb35a381c81b0379ba6f Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Fri, 29 Jan 2016 18:42:19 -0500 Subject: [PATCH] daemon: Make asynchronous notifier file descriptors close-on-exec. --- daemon/src/vcmdmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/src/vcmdmodule.c b/daemon/src/vcmdmodule.c index dd976f91..55503bce 100644 --- a/daemon/src/vcmdmodule.c +++ b/daemon/src/vcmdmodule.c @@ -15,7 +15,6 @@ #include #include #include -#include #undef NDEBUG /* XXX force enabling asserts for now */ #include @@ -164,6 +163,8 @@ static int init_evloop(void) WARN("pipe() failed"); return -1; } + set_cloexec(asyncpipe[0]); + set_cloexec(asyncpipe[1]); set_nonblock(asyncpipe[0]); ev_io_init(&asyncwatcher, vcmd_asyncreq_cb, asyncpipe[0], EV_READ); ev_io_start(loop, &asyncwatcher);