SOURCES: vixie-cron-sigchld2.patch - replaced with vfork-sigchld.p...

hawk hawk at pld-linux.org
Fri Sep 2 13:19:57 CEST 2005


Author: hawk                         Date: Fri Sep  2 11:19:57 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- replaced with vfork-sigchld.patch from Fedora, fixes SEGV when closing
  pipe to sendmail on some configurations

---- Files affected:
SOURCES:
   vixie-cron-sigchld2.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/vixie-cron-sigchld2.patch
diff -u SOURCES/vixie-cron-sigchld2.patch:1.2 SOURCES/vixie-cron-sigchld2.patch:1.3
--- SOURCES/vixie-cron-sigchld2.patch:1.2	Mon Jul 25 12:38:32 2005
+++ SOURCES/vixie-cron-sigchld2.patch	Fri Sep  2 13:19:51 2005
@@ -1,18 +1,44 @@
-diff -uNr vixie-cron-4.1.p6/do_command.c vixie-cron-4.1.p7/do_command.c
---- vixie-cron-4.1.p6/do_command.c	2005-07-24 21:57:56.000000000 +0200
-+++ vixie-cron-4.1.p7/do_command.c	2005-07-25 00:10:45.000000000 +0200
-@@ -265,6 +265,14 @@
- 				_exit(OK_EXIT);
- 			}
- # endif /*DEBUGGING*/
-+#ifdef USE_SIGCHLD
-+			/* Our grandparent is watching for our parent's death by
-+			 * catching SIGCHLD. Meanwhile, our parent will use wait
-+			 * explicitly and so has disabled SIGCHLD. So now it's
-+			 * time to reset SIGCHLD handling.
-+			 */
-+			(void) signal(SIGCHLD, SIG_DFL);
-+#endif /*USE_SIGCHLD*/
- 			execle(shell, shell, "-c", e->cmd, (char *)0, e->envp);
- 			fprintf(stderr, "execl: couldn't exec `%s'\n", shell);
- 			perror("execl");
+--- vixie-cron-4.1-rh/do_command.c.vfork_sigchld	2004-07-21 18:40:22.000000000 -0400
++++ vixie-cron-4.1-rh/do_command.c	2004-07-21 18:19:04.000000000 -0400
+@@ -136,13 +136,13 @@
+ 
+ 	/* fork again, this time so we can exec the user's command.
+ 	 */
+-	switch (vfork()) {
++	switch (fork()) {
+ 	case -1:
+-		log_it("CRON", getpid(), "error", "can't vfork");
++		log_it("CRON", getpid(), "error", "can't fork");
+ 		exit(ERROR_EXIT);
+ 		/*NOTREACHED*/
+ 	case 0:
+-		Debug(DPROC, ("[%ld] grandchild process vfork()'ed\n",
++		Debug(DPROC, ("[%ld] grandchild process fork()'ed\n",
+ 			      (long)getpid()))
+ 
+ 		/* write a log message.  we've waited this long to do it
+@@ -187,6 +187,13 @@
+ 		}
+ 		dup2(STDOUT, STDERR);
+ 
++		/* Our grandparent is watching for our parent's death by
++		 * catching SIGCHLD. Meanwhile, our parent will use wait
++		 * explicitly and so has disabled SIGCHLD. So now it's
++		 * time to reset SIGCHLD handling.
++		 */
++		(void) signal(SIGCHLD, SIG_DFL);
++
+ 		/* set our directory, uid and gid.  Set gid first, since once
+ 		 * we set uid, we've lost root privledges.
+ 		 */
+--- vixie-cron-4.1-rh/popen.c.vfork_sigchld	2004-07-21 10:16:43.000000000 -0400
++++ vixie-cron-4.1-rh/popen.c	2004-07-21 18:08:08.000000000 -0400
+@@ -84,7 +84,7 @@
+ 			break;
+ 	argv[MAX_ARGV-1] = NULL;
+ 
+-	switch (pid = vfork()) {
++	switch (pid = fork()) {
+ 	case -1:			/* error */
+ 		(void)close(pdes[0]);
+ 		(void)close(pdes[1]);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/vixie-cron-sigchld2.patch?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list