From 9b66a9a7d21c94ffc646d4868fc55addc2b1a89f Mon Sep 17 00:00:00 2001 From: thib Date: Sun, 11 Jul 2004 18:09:31 +0000 Subject: [PATCH] *** empty log message *** --- database.c | 6 ++++-- doc/en/changes.sgml | 8 ++++++-- doc/en/todo.sgml | 20 +++++--------------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/database.c b/database.c index fecfefe..2970d40 100644 --- a/database.c +++ b/database.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.c,v 1.71 2004-04-29 19:29:50 thib Exp $ */ + /* $Id: database.c,v 1.72 2004-07-11 18:09:31 thib Exp $ */ #include "fcron.h" @@ -1268,12 +1268,14 @@ time_to_sleep(time_t lim) time_t tts = lim; time_t ti = time(NULL); + /* note : jobs in queue_base are sorted */ if ( queue_base != NULL ) { if ( queue_base->j_line->cl_nextexe < lim ) tts = queue_base->j_line->cl_nextexe; } - if ( (tts = tts - ti) < 0) + tts = tts - ti; + if ( tts < 0) tts = 0; /* debug("Time to sleep: %lds", tts); */ diff --git a/doc/en/changes.sgml b/doc/en/changes.sgml index adc6c83..43f3186 100644 --- a/doc/en/changes.sgml +++ b/doc/en/changes.sgml @@ -8,7 +8,7 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Changes @@ -40,7 +40,11 @@ A copy of the license is included in gfdl.sgml. Added a sanity check in set_nextexe() to avoid such things. - + Fixed a small bug : scripts were supposing perl was in /usr/bin. + + + Fixed a bug which caused the pid of a child process + to be incorrectly read diff --git a/doc/en/todo.sgml b/doc/en/todo.sgml index ad399a0..a805757 100644 --- a/doc/en/todo.sgml +++ b/doc/en/todo.sgml @@ -8,7 +8,7 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Todo @@ -29,15 +29,6 @@ A copy of the license is included in gfdl.sgml. mails from B. Wohler : improve the doc + change (?) the name of fcrondyn -> fcronc ?? - - problem with daylight savings ? ("already running" ...) - (cf. Nick's mails -- Warning : he has a new address)) - - - add a new FAQ entry : what should be done to completely - replace vixie cron by fcron ? Are there some incompatibilities - ? - add an option to prevent fcron from running a job if the system is running on battery (anacron does it ?) @@ -50,17 +41,15 @@ A copy of the license is included in gfdl.sgml. code cleaning : create a .c/.h file for data structures (file/line lists, serial queue, lavg list, exe list), - and work with them only through functions/macros. + and work with them only through functions/macros. + + secure equivalent to str[n]{cat|copy|...} Note : thoroughly check for bugs which can be introduced during the code cleaning (make sure that after the modification, the code executed is still the same as before !). - Mem footprint reduction : for fcron processes which are aimed - at running sendmail, free() some memory (file/line lists, queues, ...) - (but does it worth it ? takes too much exe time for few memory ?) - Also use an/some union(s) in CL struct. + Mem footprint reduction : use an/some union(s) in CL struct. implement more commands for fcrondyn, and make it more @@ -121,6 +110,7 @@ A copy of the license is included in gfdl.sgml. different signals (-HUP, -TERM -STOP, .... or any other action like sending a mail to sysadmin to alert him/her that a task is taking too much time and that he has to have a look at it.) + (add an option to specify the cmd, and combine w/ option until) -- 2.40.0