projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that "PIDFile" option cannot be set when command-line option "-P" was used...
[collectd.git]
/
src
/
configfile.c
diff --git
a/src/configfile.c
b/src/configfile.c
index
0e54f26
..
c5d3e36
100644
(file)
--- a/
src/configfile.c
+++ b/
src/configfile.c
@@
-891,6
+891,13
@@
int global_option_set (const char *option, const char *value)
if (i >= cf_global_options_num)
return (-1);
if (i >= cf_global_options_num)
return (-1);
+ if (strcasecmp (option, "PIDFile") == 0 && pidfile_from_cli == 1)
+ {
+ DEBUG ("Configfile: Ignoring `PIDFILE' option because "
+ "command-line option `-P' take precedence.");
+ return (0);
+ }
+
sfree (cf_global_options[i].value);
if (value != NULL)
sfree (cf_global_options[i].value);
if (value != NULL)