]> git.saurik.com Git - redis.git/commitdiff
Correctly set the SIGARLM timer for the software watchdog.
authorantirez <antirez@gmail.com>
Tue, 27 Mar 2012 10:11:37 +0000 (12:11 +0200)
committerantirez <antirez@gmail.com>
Wed, 28 Mar 2012 11:18:17 +0000 (13:18 +0200)
src/debug.c

index 2df913b071d333a3aa764b0b46271c2f61936367..30fb00915982dbf37e51bc97df30444db16aa07f 100644 (file)
@@ -692,7 +692,7 @@ void watchdogScheduleSignal(int period) {
 
     /* Will stop the timer if period is 0. */
     it.it_value.tv_sec = period/1000;
-    it.it_value.tv_usec = period%1000;
+    it.it_value.tv_usec = (period%1000)*1000;
     /* Don't automatically restart. */
     it.it_interval.tv_sec = 0;
     it.it_interval.tv_usec = 0;