]> granicus.if.org Git - fcron/commitdiff
test_jobs use no longer an argument (it's always "now")
authorthib <thib>
Sat, 27 Jan 2001 15:33:39 +0000 (15:33 +0000)
committerthib <thib>
Sat, 27 Jan 2001 15:33:39 +0000 (15:33 +0000)
bug corrected : a job inserted in serial_queue during synchronize_dir() wasn't taken into account to determine sleep time.

fcron.c

diff --git a/fcron.c b/fcron.c
index 8a05c066fff3cefff1cd298c8157d3c071328413..fd942ee36ca39779c9b2c37d278211f1c751d50e 100644 (file)
--- a/fcron.c
+++ b/fcron.c
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fcron.c,v 1.38 2001-01-12 21:43:25 thib Exp $ */
+ /* $Id: fcron.c,v 1.39 2001-01-27 15:33:39 thib Exp $ */
 
 #include "fcron.h"
 
-char rcs_info[] = "$Id: fcron.c,v 1.38 2001-01-12 21:43:25 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.39 2001-01-27 15:33:39 thib Exp $";
 
 void main_loop(void);
 void check_signal(void);
@@ -524,7 +524,9 @@ main_loop()
     /* synchronize save with jobs execution */
     save = now + SAVE;
 
-    if ( (stime = time_to_sleep(save)) < FIRST_SLEEP )
+    if ( serial_num > 0 )
+       stime = FIRST_SLEEP;
+    else if ( (stime = time_to_sleep(save)) < FIRST_SLEEP )
        /* force first execution after FIRST_SLEEP sec : execution of jobs
         * during system boot time is not what we want */
        stime = FIRST_SLEEP;
@@ -545,7 +547,7 @@ main_loop()
        check_signal();
 
        debug("\n");
-       test_jobs(now);
+       test_jobs();
 
        if ( serial_running <= 0)
            run_serial_job();