daemon: Make asynchronous notifier file descriptors close-on-exec.
This commit is contained in:
parent
104d05a4be
commit
a102c46d37
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,6 @@
|
|||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <pthread.h>
|
||||
#include <fcntl.h>
|
||||
#undef NDEBUG /* XXX force enabling asserts for now */
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue