Modified: trunk/launchd/src/launchd_core_logic.c (23236 => 23237)
--- trunk/launchd/src/launchd_core_logic.c 2007-04-26 23:35:46 UTC (rev 23236)
+++ trunk/launchd/src/launchd_core_logic.c 2007-04-27 16:40:55 UTC (rev 23237)
@@ -5240,23 +5240,14 @@
}
for (l2l_i = 0; l2l_i < l2l_name_cnt; l2l_i++) {
+ job_t j_for_service = jobmgr_find_by_pid(jmr, l2l_pids[l2l_i], true);
struct machservice *ms;
- job_t j_for_service;
- LIST_FOREACH(j_for_service, &jmr->jobs, sle) {
- if (j_for_service->p == l2l_pids[l2l_i]) {
- break;
+ if (jobmgr_assumes(jmr, j_for_service != NULL)) {
+ if ((ms = machservice_new(j_for_service, l2l_names[l2l_i], &l2l_ports[l2l_i], false))) {
+ machservice_request_notifications(ms);
}
}
-
- if (!j_for_service) {
- j_for_service = job_new_anonymous(jmr, l2l_pids[l2l_i]);
- jobmgr_assumes(jmr, j_for_service != NULL);
- }
-
- if ((ms = machservice_new(j_for_service, l2l_names[l2l_i], &l2l_ports[l2l_i], false))) {
- machservice_request_notifications(ms);
- }
}
kr = 0;