Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cron PR/7662: TheMan: crontab does not think the fi...
details: https://anonhg.NetBSD.org/src/rev/3a9f0f833e14
branches: trunk
changeset: 473330:3a9f0f833e14
user: christos <christos%NetBSD.org@localhost>
date: Sat May 29 18:43:40 1999 +0000
description:
PR/7662: TheMan: crontab does not think the file changed if the editing session
took < 1sec.
diffstat:
usr.sbin/cron/crontab.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r cb371b563bd9 -r 3a9f0f833e14 usr.sbin/cron/crontab.c
--- a/usr.sbin/cron/crontab.c Sat May 29 18:18:30 1999 +0000
+++ b/usr.sbin/cron/crontab.c Sat May 29 18:43:40 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crontab.c,v 1.14 1999/04/09 02:47:03 cjs Exp $ */
+/* $NetBSD: crontab.c,v 1.15 1999/05/29 18:43:40 christos Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -22,7 +22,7 @@
#if 0
static char rcsid[] = "Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp";
#else
-__RCSID("$NetBSD: crontab.c,v 1.14 1999/04/09 02:47:03 cjs Exp $");
+__RCSID("$NetBSD: crontab.c,v 1.15 1999/05/29 18:43:40 christos Exp $");
#endif
#endif
@@ -319,6 +319,7 @@
int ch, t, x;
struct stat statbuf;
time_t mtime;
+ long mtimensec;
WAIT_T waiter;
PID_T pid, xpid;
@@ -397,6 +398,7 @@
goto fatal;
}
mtime = statbuf.st_mtime;
+ mtimensec = statbuf.st_mtimensec;
if ((!(editor = getenv("VISUAL")))
&& (!(editor = getenv("EDITOR")))
@@ -464,7 +466,7 @@
perror("fstat");
goto fatal;
}
- if (mtime == statbuf.st_mtime) {
+ if (mtime == statbuf.st_mtime && mtimensec == statbuf.st_mtimensec) {
fprintf(stderr, "%s: no changes made to crontab\n",
ProgramName);
goto remove;
@@ -569,7 +571,7 @@
fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
fprintf(tmp, "# (Cron version -- %s)\n",
- "$NetBSD: crontab.c,v 1.14 1999/04/09 02:47:03 cjs Exp $");
+ "$NetBSD: crontab.c,v 1.15 1999/05/29 18:43:40 christos Exp $");
/* copy the crontab to the tmp
*/
Home |
Main Index |
Thread Index |
Old Index