[Pkg-sysvinit-commits] r1423 - in sysvinit-upstream/trunk: doc src

Petter Reinholdtsen pere at alioth.debian.org
Fri Jul 10 21:37:35 UTC 2009


Author: pere
Date: 2009-07-10 21:37:34 +0000 (Fri, 10 Jul 2009)
New Revision: 1423

Modified:
   sysvinit-upstream/trunk/doc/Changelog
   sysvinit-upstream/trunk/src/init.c
Log:
Correct init to avoid race condition when starting programs during
boot.  Patch from SuSe.


Modified: sysvinit-upstream/trunk/doc/Changelog
===================================================================
--- sysvinit-upstream/trunk/doc/Changelog	2009-07-10 21:36:21 UTC (rev 1422)
+++ sysvinit-upstream/trunk/doc/Changelog	2009-07-10 21:37:34 UTC (rev 1423)
@@ -27,6 +27,8 @@
     the new process.  Patch from RedHat.
   * Correct init to make sure the waiting status is preserved across
     re-exec.  Patch from RedHat.
+  * Correct init to avoid race condition when starting programs during
+    boot.  Patch from SuSe.
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri, 30 Jul 2004 14:14:58 +0200
 

Modified: sysvinit-upstream/trunk/src/init.c
===================================================================
--- sysvinit-upstream/trunk/src/init.c	2009-07-10 21:36:21 UTC (rev 1422)
+++ sysvinit-upstream/trunk/src/init.c	2009-07-10 21:37:34 UTC (rev 1423)
@@ -967,6 +967,7 @@
   				dup(f);
   				dup(f);
 			}
+			SETSIG(sa, SIGCHLD, SIG_DFL, SA_RESTART);
 			if ((pid = fork()) < 0) {
   				initlog(L_VB, "cannot fork");
 				exit(1);
@@ -979,7 +980,6 @@
 				SETSIG(sa, SIGINT, SIG_IGN, SA_RESTART);
 				SETSIG(sa, SIGTSTP, SIG_IGN, SA_RESTART);
 				SETSIG(sa, SIGQUIT, SIG_IGN, SA_RESTART);
-				SETSIG(sa, SIGCHLD, SIG_DFL, SA_RESTART);
 
 				while ((rc = waitpid(pid, &st, 0)) != pid)
 					if (rc < 0 && errno == ECHILD)




More information about the Pkg-sysvinit-commits mailing list