nghttpx: Set CLOEXEC for ipc fds

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-22 19:52:35 +09:00
parent 87a38bdf8d
commit e77f9d95d3
1 changed files with 5 additions and 2 deletions

View File

@ -689,8 +689,11 @@ int event_loop() {
return -1;
}
util::make_socket_nonblocking(ssv.ipc_fd[0]);
util::make_socket_nonblocking(ssv.ipc_fd[1]);
for (int i = 0; i < 2; ++i) {
auto fd = ssv.ipc_fd[i];
util::make_socket_nonblocking(fd);
util::make_socket_closeonexec(fd);
}
auto loop = EV_DEFAULT;