summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/structs.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2016-01-11 14:23:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2016-01-11 14:23:51 +0000
commitd5e0dfa29205f4b236215fe2454b6ffc7bacec86 (patch)
treeb5e35b646b71b4b27dc5de2c3b4bd85ae5562e89 /usr.sbin/cron/structs.h
parentebad9f2ea5cde3598dec641799e5ea4d09a67585 (diff)
When caching the mtime of the spool directory and system crontab files,
stash a struct timespec, not just a time_t. Fixes a bug where cron could skip re-reading the spool after two consecutive changes.
Diffstat (limited to 'usr.sbin/cron/structs.h')
-rw-r--r--usr.sbin/cron/structs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/cron/structs.h b/usr.sbin/cron/structs.h
index e9e73816b00..af0d75c3b55 100644
--- a/usr.sbin/cron/structs.h
+++ b/usr.sbin/cron/structs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: structs.h,v 1.7 2015/11/09 01:12:27 millert Exp $ */
+/* $OpenBSD: structs.h,v 1.8 2016/01/11 14:23:50 millert Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -50,13 +50,13 @@ typedef struct _entry {
typedef struct _user {
TAILQ_ENTRY(_user) entries; /* links */
char *name;
- time_t mtime; /* last modtime of crontab */
+ struct timespec mtime; /* last modtime of crontab */
SLIST_HEAD(crontab_list, _entry) crontab; /* this person's crontab */
} user;
typedef struct _cron_db {
TAILQ_HEAD(user_list, _user) users;
- time_t mtime; /* last modtime on spooldir */
+ struct timespec mtime; /* last modtime on spooldir */
} cron_db;
typedef struct _atjob {
@@ -69,5 +69,5 @@ typedef struct _atjob {
typedef struct _at_db {
TAILQ_HEAD(atjob_list, _atjob) jobs;
- time_t mtime; /* last modtime on spooldir */
+ struct timespec mtime; /* last modtime on spooldir */
} at_db;