From: thib Date: Mon, 22 May 2000 17:37:03 +0000 (+0000) Subject: minor changes X-Git-Tag: ver1564~647 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b01fa8436f875ea793372706fdd0e596b53fc00c;p=fcron minor changes --- diff --git a/fcron.c b/fcron.c index c274551..541a0f9 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.4 2000-05-17 19:19:36 thib Exp $ */ + /* $Id: fcron.c,v 1.5 2000-05-22 17:37:03 thib Exp $ */ #include "fcron.h" -char rcs_info[] = "$Id: fcron.c,v 1.4 2000-05-17 19:19:36 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.5 2000-05-22 17:37:03 thib Exp $"; void main_loop(void); void info(void); @@ -209,7 +209,6 @@ parseopt(int argc, char *argv[]) case 'd': debug_opt = 1; - foreground = 1; case 'f': foreground = 1; break; @@ -441,8 +440,6 @@ void main_loop() for (;;) { - sig_chld = 0; - sleep: sleep(stime - 1); gettimeofday(&tv, NULL); @@ -507,12 +504,15 @@ void main_loop() } - if ( sig_chld == 1 ) - wait_chld(); - stime = time_to_sleep(save); t1 = t2; + + if ( sig_chld == 1 ) { + wait_chld(); + sig_chld = 0; + } + } }