[launchd-changes] [23792] branches/SULeopard

source_changes at macosforge.org source_changes at macosforge.org
Mon Feb 2 13:29:54 PST 2009


Revision: 23792
          http://trac.macosforge.org/projects/launchd/changeset/23792
Author:   dsorresso at apple.com
Date:     2009-02-02 13:29:53 -0800 (Mon, 02 Feb 2009)
Log Message:
-----------
<rdar://problem/6478577> Greyhound: launchd not going past 532 processes on 9G3534, causing tests to fail
<rdar://problem/6519096> SULeopard: Sporadic Failure of XServe Netboot

Modified Paths:
--------------
    branches/SULeopard/launchd/src/launchctl.c
    branches/SULeopard/launchd/src/launchd_core_logic.c
    branches/SULeopard/launchd/src/launchd_unix_ipc.c
    branches/SULeopard/launchd/src/rc.netboot
    branches/SULeopard/launchd.xcodeproj/project.pbxproj

Modified: branches/SULeopard/launchd/src/launchctl.c
===================================================================
--- branches/SULeopard/launchd/src/launchctl.c	2009-01-29 22:46:48 UTC (rev 23791)
+++ branches/SULeopard/launchd/src/launchctl.c	2009-02-02 21:29:53 UTC (rev 23792)
@@ -1409,11 +1409,6 @@
 	loopback_setup_ipv4();
 	loopback_setup_ipv6();
 
-	if (path_check("/etc/rc.server")) {
-		const char *rcserver_tool[] = { _PATH_BSHELL, "/etc/rc.server", NULL };
-		assumes(fwexec(rcserver_tool, true) != -1);
-	}
-
 #if TARGET_OS_EMBEDDED
 	if (path_check("/etc/rc.boot")) {
 		const char *rcboot_tool[] = { "/etc/rc.boot", NULL };
@@ -1438,6 +1433,11 @@
 		do_potential_fsck();
 	}
 
+	if (path_check("/etc/rc.server")) {
+		const char *rcserver_tool[] = { _PATH_BSHELL, "/etc/rc.server", NULL };
+		assumes(fwexec(rcserver_tool, true) != -1);
+	}
+	
 	read_launchd_conf();
 
 	if (path_check("/var/account/acct")) {

Modified: branches/SULeopard/launchd/src/launchd_core_logic.c
===================================================================
--- branches/SULeopard/launchd/src/launchd_core_logic.c	2009-01-29 22:46:48 UTC (rev 23791)
+++ branches/SULeopard/launchd/src/launchd_core_logic.c	2009-02-02 21:29:53 UTC (rev 23792)
@@ -4205,9 +4205,9 @@
 		return;
 	}
 
-#if defined (__ppc__)
+#if defined (__ppc__) || defined (__ppc64__)
 	f = PPC_THREAD_STATE64;
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__x86_64__)
 	f = x86_THREAD_STATE;
 #elif defined(__arm__)
 	f = ARM_THREAD_STATE;

Modified: branches/SULeopard/launchd/src/launchd_unix_ipc.c
===================================================================
--- branches/SULeopard/launchd/src/launchd_unix_ipc.c	2009-01-29 22:46:48 UTC (rev 23791)
+++ branches/SULeopard/launchd/src/launchd_unix_ipc.c	2009-02-02 21:29:53 UTC (rev 23792)
@@ -466,8 +466,8 @@
 					break;
 				case RLIMIT_NPROC:
 					/* kernel will not clamp to this value, we must */
-					if (gval > (2048 + 20)) {
-						gval = 2048 + 20;
+					if (gval > 2500) {
+						gval = 2500;
 					}
 					break;
 				default:

Modified: branches/SULeopard/launchd/src/rc.netboot
===================================================================
--- branches/SULeopard/launchd/src/rc.netboot	2009-01-29 22:46:48 UTC (rev 23791)
+++ branches/SULeopard/launchd/src/rc.netboot	2009-02-02 21:29:53 UTC (rev 23792)
@@ -27,6 +27,8 @@
 Failed()
 {
 	echo rc.netboot: $1
+	echo rc.netboot: $1 > /dev/console
+	sleep 5
 	exit 1
 }
 
@@ -74,11 +76,24 @@
 
 local_mount()
 {
-    volinfo=`autodiskmount -F 2>/dev/null`
-    if [ $? -ne 0 ]; then
-	echo "autodiskmount -F found no local drives"
-	return 1
-    fi
+    tries=0
+    limit=11
+    while [ $tries -lt $limit ]; do
+	tries=$(( tries + 1 ))
+	volinfo=`autodiskmount -F 2>/dev/null`
+	if [ $? -ne 0 ]; then
+	    if [ $tries -lt $limit ]; then
+		echo "Waiting for local drives..."
+		echo "Waiting for local drives (retry ${tries}/$(( limit - 1 )))..." > /dev/console
+		sleep 5
+	    else
+		echo "autodiskmount -F found no local drives"
+		return 1
+	    fi
+	else
+	    tries=$limit
+	fi
+    done
     set ${volinfo}
     devname=$1
     fstype=$2

Modified: branches/SULeopard/launchd.xcodeproj/project.pbxproj
===================================================================
--- branches/SULeopard/launchd.xcodeproj/project.pbxproj	2009-01-29 22:46:48 UTC (rev 23791)
+++ branches/SULeopard/launchd.xcodeproj/project.pbxproj	2009-02-02 21:29:53 UTC (rev 23792)
@@ -3,7 +3,7 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 46;
+	objectVersion = 45;
 	objects = {
 
 /* Begin PBXAggregateTarget section */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20090202/0428892d/attachment.html>


More information about the launchd-changes mailing list