[launchd-changes] [23950] branches/PR-7264615/launchd/src/launchd_core_logic.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 17 16:24:46 PST 2009


Revision: 23950
          http://trac.macosforge.org/projects/launchd/changeset/23950
Author:   dsorresso at apple.com
Date:     2009-11-17 16:24:45 -0800 (Tue, 17 Nov 2009)
Log Message:
-----------
Another attempt.

Modified Paths:
--------------
    branches/PR-7264615/launchd/src/launchd_core_logic.c

Modified: branches/PR-7264615/launchd/src/launchd_core_logic.c
===================================================================
--- branches/PR-7264615/launchd/src/launchd_core_logic.c	2009-11-18 00:10:09 UTC (rev 23949)
+++ branches/PR-7264615/launchd/src/launchd_core_logic.c	2009-11-18 00:24:45 UTC (rev 23950)
@@ -1421,13 +1421,13 @@
 	 * See rdar://problem/7264615 for the symptom and rdar://problem/5020256
 	 * as to why this can happen.
 	 */
-	pid_t ppid = kp.kp_eproc.e_ppid;
-	if( !jobmgr_assumes(jm, ppid != anonpid) ) {
+	if( !jobmgr_assumes(jm, kp.kp_eproc.e_ppid != anonpid) ) {
 		jobmgr_log(jm, LOG_WARNING, "Process has become its own parent through ptrace(3). It should find a different way to do whatever it's doing. Setting PPID to 0: %s", kp.kp_proc.p_comm);
-		ppid = 0;
+		errno = EINVAL;
+		return NULL;
 	}
 
-	switch (ppid) {
+	switch (kp.kp_eproc.e_ppid) {
 	case 0:
 		/* the kernel */
 		break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20091117/575d595a/attachment.html>


More information about the launchd-changes mailing list