From a40bc6c8fc409f7ad792d8de33c2d9eb1ca03e58 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 26 May 2014 16:09:37 +0100 Subject: Ensure timer never set to zero for millisleep. Bug 1426 --- src/src/exim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/src/exim.c b/src/src/exim.c index 517b5435e..6a2336450 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -310,7 +310,8 @@ struct itimerval itval; itval.it_interval.tv_sec = 0; itval.it_interval.tv_usec = 0; itval.it_value.tv_sec = msec/1000; -itval.it_value.tv_usec = (msec % 1000) * 1000; +if ((itval.it_value.tv_usec = (msec % 1000) * 1000) == 0) + itval.it_value.tv_usec = 1; milliwait(&itval); } -- cgit v1.2.3