summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/crontab.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/cron/crontab.c')
-rw-r--r--usr.sbin/cron/crontab.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index 08f1c0d9238..2fae5876d30 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.25 2001/12/07 22:33:09 deraadt Exp $ */
+/* $OpenBSD: crontab.c,v 1.26 2001/12/20 23:27:47 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*/
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char rcsid[] = "$OpenBSD: crontab.c,v 1.25 2001/12/07 22:33:09 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: crontab.c,v 1.26 2001/12/20 23:27:47 millert Exp $";
#endif
/* crontab - install and manage per-user crontab files
@@ -675,11 +675,20 @@ done:
static void
poke_daemon() {
+ char pidfile[MAX_FNAME];
+ PID_T pid;
+ FILE *fp;
+
if (utime(SPOOL_DIR, NULL) < OK) {
fprintf(stderr, "crontab: can't update mtime on spooldir\n");
perror(SPOOL_DIR);
return;
}
+ if (glue_strings(pidfile, sizeof pidfile, PIDDIR, PIDFILE, '/')) {
+ if ((fp = fopen(pidfile, "r")) &&
+ fscanf(fp, "%d", &pid) == 1)
+ kill(pid, SIGUSR1);
+ }
}
static void