nghttpx: Set close-on-exec flag on listener in worker process
This commit is contained in:
parent
4989e6e419
commit
c1f7795dd6
|
@ -1209,6 +1209,12 @@ pid_t fork_worker_process(int &main_ipc_fd,
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
ev_loop_fork(EV_DEFAULT);
|
ev_loop_fork(EV_DEFAULT);
|
||||||
|
|
||||||
|
auto config = get_config();
|
||||||
|
|
||||||
|
for (auto &addr : config->conn.listener.addrs) {
|
||||||
|
util::make_socket_closeonexec(addr.fd);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove all WorkerProcesses to stop any registered watcher on
|
// Remove all WorkerProcesses to stop any registered watcher on
|
||||||
// default loop.
|
// default loop.
|
||||||
worker_process_remove_all();
|
worker_process_remove_all();
|
||||||
|
|
Loading…
Reference in New Issue