Module Name: src
Committed By: christos
Date: Fri May 7 17:12:00 UTC 2010
Modified Files:
src/external/bsd/cron/dist: cron.c
Log Message:
remove the +1 second. Otherwise jobs that are supposed to run at 10:00:00,
run at 10:00:01 which is tolerable because cron has a 1 minute granularity,
but confusing. This restores the old behavior with the new timing logic.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/cron/dist/cron.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/cron/dist/cron.c
diff -u src/external/bsd/cron/dist/cron.c:1.4 src/external/bsd/cron/dist/cron.c:1.5
--- src/external/bsd/cron/dist/cron.c:1.4 Thu May 6 18:38:14 2010
+++ src/external/bsd/cron/dist/cron.c Fri May 7 13:12:00 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $ */
+/* $NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -25,7 +25,7 @@
#if 0
static char rcsid[] = "Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp";
#else
-__RCSID("$NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $");
+__RCSID("$NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $");
#endif
#endif
@@ -362,7 +362,7 @@
int seconds_to_wait;
t1 = time(NULL) + GMToff;
- seconds_to_wait = (int)(target * SECONDS_PER_MINUTE - t1) + 1;
+ seconds_to_wait = (int)(target * SECONDS_PER_MINUTE - t1);
Debug(DSCH, ("[%ld] Target time=%lld, sec-to-wait=%d\n",
(long)getpid(), (long long)target*SECONDS_PER_MINUTE,
seconds_to_wait));