From: Thibault Godouet Date: Sun, 18 Jun 2000 13:11:11 +0000 (+0000) Subject: variable now is now updated when SIGHUP or SIGUSR1 is received X-Git-Tag: ver2_9_4~692 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c6880f9a5f7d1ae22ef0518ded6079a0088e41b;p=thirdparty%2Ffcron.git variable now is now updated when SIGHUP or SIGUSR1 is received (this is a bug fix) --- diff --git a/fcron.c b/fcron.c index 439e5fd..f469c73 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `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(".");