From 1ee65b7f94dd94ce0bc5159fd6117f916857dcd9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 21 May 2009 20:59:17 +0000 Subject: [PATCH] Do not assume we know the value for FD_CLOEXEC. svn:r1301 --- listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listener.c b/listener.c index e31279c8..bd7176d5 100644 --- a/listener.c +++ b/listener.c @@ -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; }