Revision: 23585 http://trac.macosforge.org/projects/launchd/changeset/23585 Author: zarzycki@apple.com Date: 2008-04-02 13:18:49 -0700 (Wed, 02 Apr 2008) Log Message: ----------- <rdar://problem/5835375> 10.5.3 Regression: Failure to shutdown in 9D11 with zombie shutdown Modified Paths: -------------- branches/SULeopard/launchd/src/launchd_core_logic.c Modified: branches/SULeopard/launchd/src/launchd_core_logic.c =================================================================== --- branches/SULeopard/launchd/src/launchd_core_logic.c 2008-04-02 17:48:25 UTC (rev 23584) +++ branches/SULeopard/launchd/src/launchd_core_logic.c 2008-04-02 20:18:49 UTC (rev 23585) @@ -3884,7 +3884,7 @@ } else if (j->removal_pending) { job_log(j, LOG_DEBUG, "Exited while removal was pending."); return true; - } else if (j->mgr->shutting_down && j->mgr->hopefully_first_cnt == 0) { + } else if (j->mgr->shutting_down && (j->hopefully_exits_first || j->mgr->hopefully_first_cnt == 0)) { job_log(j, LOG_DEBUG, "Exited while shutdown in progress. Processes remaining: %lu/%lu", total_children, total_anon_children); return true; } else if (j->legacy_mach_job) { @@ -3910,13 +3910,17 @@ struct stat sb; bool good_exit = (WIFEXITED(j->last_exit_status) && WEXITSTATUS(j->last_exit_status) == 0); + if (j->mgr->shutting_down) { + return false; + } + /* * 5066316 * * We definitely need to revisit this after Leopard ships. Please see * launchctl.c for the other half of this hack. */ - if ((j->mgr->shutting_down || j->mgr->global_on_demand_cnt > 0) && strcmp(j->label, "com.apple.kextd") != 0) { + if (j->mgr->global_on_demand_cnt > 0 && strcmp(j->label, "com.apple.kextd") != 0) { return false; }
participants (1)
-
source_changes@macosforge.org