From 75c754890b7e23230ff353608e2a1acf16ede437 Mon Sep 17 00:00:00 2001 From: Toshiaki Takahashi Date: Tue, 15 May 2018 09:06:16 +0000 Subject: [PATCH] Fix collecdmon not start collectd Because collectdmon cannot exit parse command line options loop, it cannot execute collectd start processing. --- src/collectdmon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.11.0