Revision: 23396 http://trac.macosforge.org/projects/launchd/changeset/23396 Author: zarzycki@apple.com Date: 2007-09-17 13:00:36 -0700 (Mon, 17 Sep 2007) Log Message: ----------- More documentation. Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2007-09-17 19:41:22 UTC (rev 23395) +++ trunk/launchd/src/launchd_core_logic.c 2007-09-17 20:00:36 UTC (rev 23396) @@ -1967,6 +1967,19 @@ */ killpg(j->p, SIGKILL); + /* + * 5020256 + * + * The current implementation of ptrace() causes the traced process to + * be abducted away from the true parent and adopted by the tracer. + * + * Once the tracing process relinquishes control, the kernel then + * restores the true parent/child relationship. + * + * Unfortunately, the wait*() family of APIs is unaware of the temporarily + * data structures changes, and they return an error if reality hasn't + * been restored by the time they are called. + */ if (!job_assumes(j, wait4(j->p, &status, 0, &ru) != -1)) { job_log(j, LOG_NOTICE, "Working around 5020256. Assuming the job crashed.");
participants (1)
-
source_changes@macosforge.org