From fbaceca37c8e5b412aa7fa8348993cdcd1219b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Tue, 3 Mar 2009 10:41:06 +0000 Subject: [PATCH] Fix useless redirection of stderr in mod_rrdtool, as it gets redirected to /dev/null later. (fixes #1922) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2407 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/mod_rrdtool.c | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 1c40dbf4..f01cbbdd 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ NEWS * Fix EAGAIN handling for freebsd sendfile (fixes #1913, thx AnMaster for spotting the problem) * Fix segfault in mod_scgi (fixes #1911) * Treat EPIPE as connection-closed error in network_freebsd_sendfile.c (another fix from #1913) + * Fix useless redirection of stderr in mod_rrdtool, as it gets redirected to /dev/null later. (fixes #1922) - 1.4.21 - 2009-02-16 diff --git a/src/mod_rrdtool.c b/src/mod_rrdtool.c index 272fa984..2cb4640b 100644 --- a/src/mod_rrdtool.c +++ b/src/mod_rrdtool.c @@ -132,13 +132,6 @@ int mod_rrd_create_pipe(server *srv, plugin_data *p) { /* not needed */ close(to_rrdtool_fds[1]); - close(STDERR_FILENO); - - if (srv->errorlog_mode == ERRORLOG_FILE) { - dup2(srv->errorlog_fd, STDERR_FILENO); - close(srv->errorlog_fd); - } - /* set up args */ argc = 3; args = malloc(sizeof(*args) * argc); @@ -149,7 +142,7 @@ int mod_rrd_create_pipe(server *srv, plugin_data *p) { args[i++] = NULL; openDevNull(STDERR_FILENO); - + /* we don't need the client socket */ for (i = 3; i < 256; i++) { close(i);