diff -uprk.orig vixie-cron-4.1.20040916.orig/usr.sbin/cron/atrun.c vixie-cron-4.1.20040916/usr.sbin/cron/atrun.c --- vixie-cron-4.1.20040916.orig/usr.sbin/cron/atrun.c 2004-12-18 20:42:40 +0300 +++ vixie-cron-4.1.20040916/usr.sbin/cron/atrun.c 2004-12-18 20:49:37 +0300 @@ -27,6 +27,9 @@ static const char rcsid[] = "$OpenBSD: a #include "cron.h" #include #include +#ifdef HAVE_SETPROCTITLE +#include +#endif static void unlink_job(at_db *, atjob *); static void run_job(atjob *, char *); diff -uprk.orig vixie-cron-4.1.20040916.orig/usr.sbin/cron/do_command.c vixie-cron-4.1.20040916/usr.sbin/cron/do_command.c --- vixie-cron-4.1.20040916.orig/usr.sbin/cron/do_command.c 2004-12-18 20:42:40 +0300 +++ vixie-cron-4.1.20040916/usr.sbin/cron/do_command.c 2004-12-18 20:49:32 +0300 @@ -26,6 +26,9 @@ static char const rcsid[] = "$OpenBSD: d #endif #include "cron.h" +#ifdef HAVE_SETPROCTITLE +#include +#endif static int child_process(entry *, user *); @@ -91,16 +94,16 @@ child_process(entry *e, user *u) { Debug(DPROC, ("[%ld] child_process('%s')\n", (long)getpid(), e->cmd)) - /* mark ourselves as different to PS command watchers */ -#ifdef HAVE_SETPROCTITLE - setproctitle("running job"); -#endif - /* discover some useful and important environment settings */ usernm = e->pwd->pw_name; mailto = env_get("MAILTO", envp); + /* mark ourselves as different to PS command watchers */ +#ifdef HAVE_SETPROCTITLE + setproctitle("job %s", usernm); +#endif + bzero((char *)&sact, sizeof sact); sigemptyset(&sact.sa_mask); sact.sa_flags = 0; diff -uprk.orig vixie-cron-4.1.20040916.orig/usr.sbin/cron/Makefile vixie-cron-4.1.20040916/usr.sbin/cron/Makefile --- vixie-cron-4.1.20040916.orig/usr.sbin/cron/Makefile 2004-12-18 20:42:40 +0300 +++ vixie-cron-4.1.20040916/usr.sbin/cron/Makefile 2004-12-18 20:48:41 +0300 @@ -3,8 +3,8 @@ PROG= crond SRCS= cron.c database.c user.c entry.c job.c do_command.c \ misc.c env.c popen.c atrun.c closeall.c pam_auth.c ../../lib/libc/gen/pw_dup.c -CFLAGS+=-I${.CURDIR} -LDLIBS+=-lpam +CFLAGS+=-I${.CURDIR} -DHAVE_SETPROCTITLE=1 +LDLIBS+=-lpam -lsetproctitle MAN= cron.8 #.include