summaryrefslogtreecommitdiff
path: root/src/mod_accesslog.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-12-07 15:22:49 +0000
committerStefan Bühler <stbuehler@web.de>2008-12-07 15:22:49 +0000
commit21c5377d3f28e987b76409b9f3cdca298d954519 (patch)
tree0c9aac25c473b7c68efba30847d6844a470ff76d /src/mod_accesslog.c
parent36f74e5d23e4d64a123c9ebf0822dd940c896e27 (diff)
downloadlighttpd-git-21c5377d3f28e987b76409b9f3cdca298d954519.tar.gz
Use FD_CLOEXEC if possible (fixes #1821)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2363 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_accesslog.c')
-rw-r--r--src/mod_accesslog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mod_accesslog.c b/src/mod_accesslog.c
index 3d5efbc6..420ef082 100644
--- a/src/mod_accesslog.c
+++ b/src/mod_accesslog.c
@@ -540,8 +540,9 @@ SETDEFAULTS_FUNC(log_access_open) {
return HANDLER_ERROR;
}
+#ifdef FD_CLOEXEC
fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
-
+#endif
}
return HANDLER_GO_ON;
@@ -584,6 +585,9 @@ SIGHUP_FUNC(log_access_cycle) {
return HANDLER_ERROR;
}
+#ifdef FD_CLOEXEC
+ fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
+#endif
}
}