summaryrefslogtreecommitdiff
path: root/src/mod_rrdtool.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_rrdtool.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_rrdtool.c')
-rw-r--r--src/mod_rrdtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_rrdtool.c b/src/mod_rrdtool.c
index 28003c41..48384525 100644
--- a/src/mod_rrdtool.c
+++ b/src/mod_rrdtool.c
@@ -148,6 +148,8 @@ int mod_rrd_create_pipe(server *srv, plugin_data *p) {
args[i++] = dash;
args[i++] = NULL;
+ openDevNull(STDERR_FILENO);
+
/* we don't need the client socket */
for (i = 3; i < 256; i++) {
close(i);
@@ -156,7 +158,7 @@ int mod_rrd_create_pipe(server *srv, plugin_data *p) {
/* exec the cgi */
execv(args[0], args);
- log_error_write(srv, __FILE__, __LINE__, "sss", "spawing rrdtool failed: ", strerror(errno), args[0]);
+ /* log_error_write(srv, __FILE__, __LINE__, "sss", "spawing rrdtool failed: ", strerror(errno), args[0]); */
/* */
SEGFAULT();