summaryrefslogtreecommitdiff
path: root/src/mod_accesslog.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-04-29 20:59:39 +0000
committerStefan Bühler <stbuehler@web.de>2008-04-29 20:59:39 +0000
commit93e7167f84c976711ef17804dcdcd24442b67714 (patch)
tree9ec5cb76cbe20dd31219761f6c93a142053693ec /src/mod_accesslog.c
parentf9999e286ed0b00a1f0a2fdf4eb3015733e3e5e5 (diff)
downloadlighttpd-git-93e7167f84c976711ef17804dcdcd24442b67714.tar.gz
Implement a clean way to open /dev/null and use it to close stdin/out/err in the needed places (#624)
- as stderr gets redirected to /dev/null before exec in childs, we cannot write to the log afterwards, so disabled that log messages too. git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2163 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_accesslog.c')
-rw-r--r--src/mod_accesslog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_accesslog.c b/src/mod_accesslog.c
index 5f9f6594..313cac5a 100644
--- a/src/mod_accesslog.c
+++ b/src/mod_accesslog.c
@@ -498,6 +498,8 @@ SETDEFAULTS_FUNC(log_access_open) {
/* not needed */
close(to_log_fds[1]);
+ openDevNull(STDERR_FILENO);
+
/* we don't need the client socket */
for (i = 3; i < 256; i++) {
close(i);