From: Florian Forster Date: Tue, 27 Mar 2007 13:07:23 +0000 (+0200) Subject: logfile plugin: Don't call `access' with `stdout' and `stderr'. X-Git-Tag: collectd-4.0.0~137 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=26a74c3827e6152bca39da79715f4a14ae2c38f7;p=collectd.git logfile plugin: Don't call `access' with `stdout' and `stderr'. --- diff --git a/src/logfile.c b/src/logfile.c index d251284b..ceee7b80 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -67,7 +67,9 @@ static int logfile_config (const char *key, const char *value) else if (0 == strcasecmp (key, "File")) { sfree (log_file); - if (access (value, W_OK) == 0) + if ((strcasecmp (value, "stdout") == 0) + || (strcasecmp (value, "stderr") == 0) + || (access (value, W_OK) == 0)) log_file = strdup (value); else { char errbuf[1024];