svn commit: trunk/busybox/miscutils

vda at busybox.net vda at busybox.net
Tue Dec 2 21:52:25 UTC 2008


Author: vda
Date: 2008-12-02 13:52:24 -0800 (Tue, 02 Dec 2008)
New Revision: 24235

Log:
crond: put tasks in separate process groups



Modified:
   trunk/busybox/miscutils/crond.c


Changeset:
Modified: trunk/busybox/miscutils/crond.c
===================================================================
--- trunk/busybox/miscutils/crond.c	2008-12-02 20:38:36 UTC (rev 24234)
+++ trunk/busybox/miscutils/crond.c	2008-12-02 21:52:24 UTC (rev 24235)
@@ -779,6 +779,8 @@
 			xmove_fd(mailFd, mail_filename ? 1 : 0);
 			dup2(1, 2);
 		}
+		/* "standard" cron puts tasks in separate process groups */
+		setpgrp();
 		execlp(prog, prog, cmd, arg, NULL);
 		crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg);
 		if (mail_filename) {
@@ -914,6 +916,8 @@
 		if (DebugOpt) {
 			crondlog(LVL5 "child running %s", DEFAULT_SHELL);
 		}
+		/* "standard" cron puts tasks in separate process groups */
+		setpgrp();
 		execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
 		crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user,
 				 DEFAULT_SHELL, "-c", line->cl_Shell);




More information about the busybox-cvs mailing list