From: Thibault Godouet Date: Sun, 24 Feb 2002 16:50:14 +0000 (+0000) Subject: bug fixed : used to call sleep(-1) instead of sleep(0) X-Git-Tag: ver2_9_4~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b253987457c0db9e9d45c7b230db3229db60d09d;p=thirdparty%2Ffcron.git bug fixed : used to call sleep(-1) instead of sleep(0) --- diff --git a/fcron.c b/fcron.c index 1faffba..51b3db8 100644 --- 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