Sisyphus repository
Last update: 17 december 2017 | SRPMs: 18242 | Visits: 10585420
en ru br
ALT Linux repos
S:4.1.20060426-alt10
5.0: 4.1.20060426-alt6
4.1: 4.1.20060426-alt4
4.0: 4.1.20060426-alt4
3.0: 4.1.20040916-alt2

Group :: System/Servers
RPM: vixie-cron

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: vixie-cron-4.1.20040916-alt-setproctitle.patch
Download


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 <limits.h>
 #include <sys/resource.h>
+#ifdef HAVE_SETPROCTITLE
+#include <setproctitle.h>
+#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 <setproctitle.h>
+#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 <bsd.prog.mk>
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin