From: thib Date: Tue, 19 Jul 2005 10:40:07 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ver2_9_7~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4fe63d18b90fd8d0617a9b70042fbfafaa84126;p=fcron *** empty log message *** --- diff --git a/doc/en/todo.sgml b/doc/en/todo.sgml index d2717d4..0bef923 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 @@ -24,6 +24,9 @@ A copy of the license is included in gfdl.sgml. High priority + + sets TZ= for jobs with a timezone option + test the fix for empty mails on non linux systems diff --git a/fcron.c b/fcron.c index 245a242..b5ecc4b 100644 --- a/fcron.c +++ b/fcron.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.74 2005-06-11 22:50:02 thib Exp $ */ + /* $Id: fcron.c,v 1.75 2005-07-19 10:40:08 thib Exp $ */ #include "fcron.h" @@ -33,7 +33,7 @@ #include "socket.h" #endif -char rcs_info[] = "$Id: fcron.c,v 1.74 2005-06-11 22:50:02 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.75 2005-07-19 10:40:08 thib Exp $"; void main_loop(void); void check_signal(void); @@ -727,14 +727,18 @@ main_loop() #ifdef FCRONDYN gettimeofday(&tv, NULL); tv.tv_sec = (stime > 1) ? stime - 1 : 0; - tv.tv_usec = 1000000 - tv.tv_usec; + /* we set tv_usec to slightly more than necessary to avoid + * infinite loop */ + tv.tv_usec = 1001000 - tv.tv_usec; if((retcode = select(set_max_fd+1, &read_set, NULL, NULL, &tv)) < 0 && errno != EINTR) die_e("select return %d", errno); #else if (stime > 1) sleep(stime - 1); gettimeofday(&tv, NULL); - usleep( 1000000 - tv.tv_usec ); + /* we set tv_usec to slightly more than necessary to avoid + * infinite loop */ + usleep( 1001000 - tv.tv_usec ); #endif /* FCRONDYN */ #else sleep(stime); diff --git a/fcrontab.c b/fcrontab.c index 6687963..3ed129e 100644 --- a/fcrontab.c +++ b/fcrontab.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcrontab.c,v 1.66 2005-02-26 15:10:11 thib Exp $ */ + /* $Id: fcrontab.c,v 1.67 2005-07-19 10:40:07 thib Exp $ */ /* * The goal of this program is simple : giving a user interface to fcron @@ -47,7 +47,7 @@ #include "temp_file.h" #include "read_string.h" -char rcs_info[] = "$Id: fcrontab.c,v 1.66 2005-02-26 15:10:11 thib Exp $"; +char rcs_info[] = "$Id: fcrontab.c,v 1.67 2005-07-19 10:40:07 thib Exp $"; void info(void); void usage(void); @@ -927,7 +927,7 @@ parseopt(int argc, char *argv[]) if ( user == NULL ) { /* get user's name using getpwuid() */ if ( ! (pass = getpwuid(uid)) ) - die("user \"%s\" is not in passwd file. Aborting.", USERNAME); + die_e("user \"%s\" is not in passwd file. Aborting.", USERNAME); /* we need to strdup2 the value given by getpwuid() because we free * file->cf_user in delete_file */ user = strdup2(pass->pw_name); @@ -948,7 +948,7 @@ parseopt(int argc, char *argv[]) asgid = pass->pw_gid; } else - die("user \"%s\" is not in passwd file. Aborting.", user); + die_e("user \"%s\" is not in passwd file. Aborting.", user); } if ( @@ -998,7 +998,7 @@ main(int argc, char **argv) parseopt(argc, argv); if ( ! (pass = getpwnam(USERNAME)) ) - die("user \"%s\" is not in passwd file. Aborting.", USERNAME); + die_e("user \"%s\" is not in passwd file. Aborting.", USERNAME); fcrontab_uid = pass->pw_uid; fcrontab_gid = pass->pw_gid;