sockets O_CLOEXEC

This commit is contained in:
Michael Davidsaver
2021-01-28 08:19:32 -08:00
parent b7640016a6
commit fb7abfc132
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ ServIface::ServIface(const std::string& addr, unsigned short port, server::Serve
#endif
const int backlog = 4;
listener = evlisten(evconnlistener_new(server->acceptor_loop.base, onConnS, this, LEV_OPT_DISABLED, backlog, sock.sock));
listener = evlisten(evconnlistener_new(server->acceptor_loop.base, onConnS, this, LEV_OPT_DISABLED|LEV_OPT_CLOSE_ON_EXEC, backlog, sock.sock));
if(!LEV_OPT_DISABLED)
evconnlistener_disable(listener.get());