From: Florian Forster Date: Tue, 7 Nov 2006 19:52:29 +0000 (+0100) Subject: Break out of the `nanosleep' loop if `loop' is set to non-zero. X-Git-Tag: collectd-3.11.0~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9513f4000aea72580d96968214f18e059ad12eb9;p=collectd.git Break out of the `nanosleep' loop if `loop' is set to non-zero. --- diff --git a/src/collectd.c b/src/collectd.c index ef2ccc75..64da5765 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -207,7 +207,7 @@ static int start_client (void) continue; } - while (nanosleep (&ts_wait, &ts_wait) == -1) + while ((loop == 0) && (nanosleep (&ts_wait, &ts_wait) == -1)) { if (errno != EINTR) {