From: Toshiaki Takahashi Date: Tue, 15 May 2018 09:06:16 +0000 (+0000) Subject: Fix collecdmon not start collectd X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=75c754890b7e23230ff353608e2a1acf16ede437 Fix collecdmon not start collectd Because collectdmon cannot exit parse command line options loop, it cannot execute collectd start processing. --- diff --git a/src/collectdmon.c b/src/collectdmon.c index 43ff6af2..36cd939a 100644 --- a/src/collectdmon.c +++ b/src/collectdmon.c @@ -276,9 +276,10 @@ int main(int argc, char **argv) { while (42) { int c = getopt(argc, argv, "hc:P:"); - switch (c) { - case -1: + if (c == -1) break; + + switch (c) { case 'c': collectd = optarg; break;