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);