summaryrefslogtreecommitdiff
path: root/listener.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-05-21 20:59:17 +0000
committerNick Mathewson <nickm@torproject.org>2009-05-21 20:59:17 +0000
commit1ee65b7f94dd94ce0bc5159fd6117f916857dcd9 (patch)
tree247e0de7d8946c20462bcb861acb5932ce251a56 /listener.c
parent7e3ea82ee6f89d9d7035aec388c766e235752f79 (diff)
downloadlibevent-1ee65b7f94dd94ce0bc5159fd6117f916857dcd9.tar.gz
Do not assume we know the value for FD_CLOEXEC.
svn:r1301
Diffstat (limited to 'listener.c')
-rw-r--r--listener.c2
1 files changed, 1 insertions, 1 deletions
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;
}