mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-18 08:49:57 -04:00
The LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener sockets too
This commit is contained in:
parent
7e9e289367
commit
4970329a88
@ -190,6 +190,8 @@ evconnlistener_new(struct event_base *base,
|
||||
lev->base.accept4_flags = 0;
|
||||
if (!(flags & LEV_OPT_LEAVE_SOCKETS_BLOCKING))
|
||||
lev->base.accept4_flags |= EVUTIL_SOCK_NONBLOCK;
|
||||
if (flags & LEV_OPT_CLOSE_ON_EXEC)
|
||||
lev->base.accept4_flags |= EVUTIL_SOCK_CLOEXEC;
|
||||
|
||||
if (flags & LEV_OPT_THREADSAFE) {
|
||||
EVTHREAD_ALLOC_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user