]> granicus.if.org Git - fcron/commitdiff
variable now is now updated when SIGHUP or SIGUSR1 is received
authorthib <thib>
Sun, 18 Jun 2000 13:11:11 +0000 (13:11 +0000)
committerthib <thib>
Sun, 18 Jun 2000 13:11:11 +0000 (13:11 +0000)
(this is a bug fix)

fcron.c

diff --git a/fcron.c b/fcron.c
index 439e5fdfd9ece1e46e0c888752ac8b7fc9cb9068..f469c732b54232cfec173b73396bd0802280938c 100644 (file)
--- a/fcron.c
+++ b/fcron.c
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fcron.c,v 1.13 2000-06-16 11:52:31 thib Exp $ */
+ /* $Id: fcron.c,v 1.14 2000-06-18 13:11:11 thib Exp $ */
 
 #include "fcron.h"
 
-char rcs_info[] = "$Id: fcron.c,v 1.13 2000-06-16 11:52:31 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.14 2000-06-18 13:11:11 thib Exp $";
 
 void main_loop(void);
 void info(void);
@@ -449,7 +449,11 @@ void main_loop()
     /* synchronize save with jobs execution */
     save = now + SAVE;
 
-    stime = time_to_sleep(save);
+    if ( (stime = time_to_sleep(save)) < 60 )
+       /* force first execution after 60 sec : execution of job during
+          system boot time is not what we want */
+       stime = 60;
+    
 
     for (;;) {
        
@@ -463,6 +467,8 @@ void main_loop()
        }
        else if (sig_conf > 0) {
 
+           now = time(NULL);
+
            if (sig_conf == 1)
                /* update configuration */
                synchronize_dir(".");