Do not assume we know the value for FD_CLOEXEC.

svn:r1301
This commit is contained in:
Nick Mathewson 2009-05-21 20:59:17 +00:00
parent 7e3ea82ee6
commit 1ee65b7f94

View File

@ -104,7 +104,7 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb, void *ptr
#ifndef WIN32
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);
return NULL;
}