From 9513f4000aea72580d96968214f18e059ad12eb9 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 7 Nov 2006 20:52:29 +0100 Subject: [PATCH] Break out of the `nanosleep' loop if `loop' is set to non-zero. --- src/collectd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2