]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
bug fixed : used to call sleep(-1) instead of sleep(0)
authorThibault Godouet <yo8192@users.noreply.github.com>
Sun, 24 Feb 2002 16:50:14 +0000 (16:50 +0000)
committerThibault Godouet <yo8192@users.noreply.github.com>
Sun, 24 Feb 2002 16:50:14 +0000 (16:50 +0000)
fcron.c

diff --git a/fcron.c b/fcron.c
index 1faffba470a11ef2edf6213da01b8a8a123260fa..51b3db8633301c07c8c57d0500b871f77a88d999 100644 (file)
--- a/fcron.c
+++ b/fcron.c
@@ -21,7 +21,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fcron.c,v 1.58 2002-01-27 16:32:53 thib Exp $ */
+ /* $Id: fcron.c,v 1.59 2002-02-24 16:50:14 thib Exp $ */
 
 #include "fcron.h"
 
@@ -29,7 +29,7 @@
 #include "conf.h"
 #include "job.h"
 
-char rcs_info[] = "$Id: fcron.c,v 1.58 2002-01-27 16:32:53 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.59 2002-02-24 16:50:14 thib Exp $";
 
 void main_loop(void);
 void check_signal(void);
@@ -636,7 +636,8 @@ main_loop()
     for (;;) {
        
 #ifdef HAVE_GETTIMEOFDAY
-       sleep(stime - 1);
+       if (stime > 1)
+           sleep(stime - 1);
        gettimeofday(&tv, NULL);
        usleep( 1000000 - tv.tv_usec );
 #else