mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Do not assume we know the value for FD_CLOEXEC.
svn:r1301
This commit is contained in:
parent
7e3ea82ee6
commit
1ee65b7f94
@ -104,7 +104,7 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb, void *ptr
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if (flags & LEV_OPT_CLOSE_ON_EXEC) {
|
if (flags & LEV_OPT_CLOSE_ON_EXEC) {
|
||||||
if (fcntl(fd, F_SETFD, 1) == -1) {
|
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
|
||||||
EVUTIL_CLOSESOCKET(fd);
|
EVUTIL_CLOSESOCKET(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user