Revision
23115
Author
zarzycki@apple.com
Date
2007-02-27 12:28:31 -0800 (Tue, 27 Feb 2007)

Log Message

<rdar://problem/5025358> Bug: launchd_core_logic.c:562 (23087):2: TAILQ_NEXT(ji, sle) == NULL

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (23114 => 23115)


--- trunk/launchd/src/launchd_core_logic.c	2007-02-27 20:08:06 UTC (rev 23114)
+++ trunk/launchd/src/launchd_core_logic.c	2007-02-27 20:28:31 UTC (rev 23115)
@@ -1648,7 +1648,7 @@
 
 	job_log(j, LOG_DEBUG, "Reaping");
 
-	if (j->log_redirect_fd && !j->wait4pipe_eof) {
+	if (j->log_redirect_fd && (!j->wait4pipe_eof || j->mgr->shutting_down)) {
 		job_assumes(j, close(j->log_redirect_fd) != -1);
 		j->log_redirect_fd = 0;
 	}