Diff
Modified: trunk/launchd/src/launchd_core_logic.c (23115 => 23116)
--- trunk/launchd/src/launchd_core_logic.c 2007-02-27 20:28:31 UTC (rev 23115)
+++ trunk/launchd/src/launchd_core_logic.c 2007-02-27 20:39:13 UTC (rev 23116)
@@ -633,6 +633,8 @@
return;
}
+ ipc_close_all_with_job(j);
+
if (j->forced_peers_to_demand_mode) {
job_set_global_on_demand(j, false);
}
Modified: trunk/launchd/src/launchd_unix_ipc.c (23115 => 23116)
--- trunk/launchd/src/launchd_unix_ipc.c 2007-02-27 20:28:31 UTC (rev 23115)
+++ trunk/launchd/src/launchd_unix_ipc.c 2007-02-27 20:39:13 UTC (rev 23116)
@@ -238,6 +238,18 @@
}
void
+ipc_close_all_with_job(job_t j)
+{
+ struct conncb *ci, *cin;
+
+ SLIST_FOREACH_SAFE(ci, &connections, sle, cin) {
+ if (ci->j == j) {
+ ipc_close(ci);
+ }
+ }
+}
+
+void
ipc_close_fds(launch_data_t o)
{
size_t i;
Modified: trunk/launchd/src/launchd_unix_ipc.h (23115 => 23116)
--- trunk/launchd/src/launchd_unix_ipc.h 2007-02-27 20:28:31 UTC (rev 23115)
+++ trunk/launchd/src/launchd_unix_ipc.h 2007-02-27 20:39:13 UTC (rev 23116)
@@ -37,6 +37,7 @@
extern char *sockpath;
void ipc_open(int fd, job_t j);
+void ipc_close_all_with_job(job_t j);
void ipc_close(struct conncb *c);
void ipc_callback(void *, struct kevent *);
void ipc_readmsg(launch_data_t msg, void *context);