run_reboot_jobs(cron_db *),
find_jobs(int, cron_db *, int, int),
set_time(int),
- cron_sleep(int),
+ cron_sleep(int, cron_db *),
sigchld_handler(int),
sighup_handler(int),
sigchld_reaper(void),
/* ... wait for the time (in minutes) to change ... */
do {
- cron_sleep(timeRunning + 1);
+ cron_sleep(timeRunning + 1, &database);
set_time(FALSE);
} while (clockTime == timeRunning);
timeRunning = clockTime;
/* Check to see if we received a signal while running jobs. */
if (got_sighup) {
got_sighup = 0;
+ database.mtime = (time_t) 0;
log_close();
}
if (got_sigchld) {
* Try to just hit the next minute.
*/
static void
-cron_sleep(int target) {
+cron_sleep(int target, cron_db *db) {
time_t t1, t2;
int seconds_to_wait;
*/
if (got_sighup) {
got_sighup = 0;
+ db->mtime = (time_t) 0;
log_close();
}
if (got_sigchld) {
if ( not_a_crontab ( dp ) )
continue;
- if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR, dp->d_name, '/'))
+ if (!glue_strings(tabname, sizeof tabname, dir_name, dp->d_name, '/'))
continue; /* XXX log? */
if ( stat( tabname, &st ) < OK )