Revision
23003
Author
zarzycki@apple.com
Date
2007-01-04 15:29:06 -0800 (Thu, 04 Jan 2007)

Log Message

It would be good to log that the job closed its end of the pipe pair.

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (23002 => 23003)


--- trunk/launchd/src/launchd_core_logic.c	2007-01-04 23:15:46 UTC (rev 23002)
+++ trunk/launchd/src/launchd_core_logic.c	2007-01-04 23:29:06 UTC (rev 23003)
@@ -1699,6 +1699,7 @@
 	rsz = read(j->log_redirect_fd, buf, BIG_PIPE_SIZE);
 
 	if (rsz == 0) {
+		job_log(j, LOG_DEBUG, "Standard out/error pipe closed");
 		job_assumes(j, close(j->log_redirect_fd) != -1);
 		j->log_redirect_fd = 0;
 	} else if (job_assumes(j, rsz != -1)) {
@@ -1706,7 +1707,7 @@
 
 		while ((msg = strsep(&bufindex, "\n\r"))) {
 			if (msg[0]) {
-				job_log(j, LOG_NOTICE, "Standard Out/Error: %s", msg);
+				job_log(j, LOG_NOTICE, "Standard out/error: %s", msg);
 			}
 		}
 	}