[launchd-changes] [23059] trunk/launchd/src
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 13 17:42:51 PST 2007
Revision: 23059
http://trac.macosforge.org/projects/launchd/changeset/23059
Author: zarzycki at apple.com
Date: 2007-02-13 17:42:50 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
More logging.
Modified Paths:
--------------
trunk/launchd/src/launchd_core_logic.c
trunk/launchd/src/launchd_runtime.c
Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- trunk/launchd/src/launchd_core_logic.c 2007-02-13 21:39:11 UTC (rev 23058)
+++ trunk/launchd/src/launchd_core_logic.c 2007-02-14 01:42:50 UTC (rev 23059)
@@ -362,6 +362,8 @@
return;
}
+ job_log(j, LOG_DEBUG, "Ignoring...");
+
j->currently_ignored = true;
SLIST_FOREACH(sg, &j->sockets, sle) {
@@ -388,6 +390,8 @@
return;
}
+ job_log(j, LOG_DEBUG, "Watching...");
+
j->currently_ignored = false;
SLIST_FOREACH(sg, &j->sockets, sle) {
@@ -1735,11 +1739,17 @@
if (job_useless(j)) {
job_remove(j);
return NULL;
- } else if (kickstart || job_keepalive(j)) {
+ } else if (kickstart) {
+ job_log(j, LOG_DEBUG, "Kick-starting.");
job_start(j);
+ } else if (job_keepalive(j)) {
+ job_log(j, LOG_DEBUG, "Keeping alive...");
+ job_start(j);
} else {
job_watch(j);
}
+ } else {
+ job_log(j, LOG_DEBUG, "Tried to dispatch an already active job.");
}
return j;
@@ -1824,6 +1834,9 @@
{
job_t j = obj;
+ job_log(j, LOG_DEBUG, "kev.ident = 0x%lx kev.filter = 0x%x kev->flags = 0x%x kev.fflags = 0x%x kev.data = 0x%lx kev.udata = %p",
+ kev->ident, kev->filter, kev->flags, kev->fflags, kev->data, kev->udata);
+
switch (kev->filter) {
case EVFILT_PROC:
return job_callback_proc(j, kev->fflags);
@@ -2900,8 +2913,9 @@
SLIST_FOREACH(ms, &j->machservices, sle) {
statusCnt = MACH_PORT_RECEIVE_STATUS_COUNT;
if (mach_port_get_attributes(mach_task_self(), ms->port, MACH_PORT_RECEIVE_STATUS,
- (mach_port_info_t)&status, &statusCnt) != KERN_SUCCESS)
+ (mach_port_info_t)&status, &statusCnt) != KERN_SUCCESS) {
continue;
+ }
if (status.mps_msgcount) {
job_log(j, LOG_DEBUG, "KeepAlive check: job restarted due to %d queued Mach messages on service: %s",
status.mps_msgcount, ms->name);
Modified: trunk/launchd/src/launchd_runtime.c
===================================================================
--- trunk/launchd/src/launchd_runtime.c 2007-02-13 21:39:11 UTC (rev 23058)
+++ trunk/launchd/src/launchd_runtime.c 2007-02-14 01:42:50 UTC (rev 23059)
@@ -165,7 +165,9 @@
}
if (status.mps_msgcount) {
EV_SET(&kev, members[i], EVFILT_MACHPORT, 0, 0, 0, jobmgr_find_by_service_port(root_jobmgr, members[i]));
- (*((kq_callback *)kev.udata))(kev.udata, &kev);
+ if (launchd_assumes(kev.udata != NULL)) {
+ (*((kq_callback *)kev.udata))(kev.udata, &kev);
+ }
/* the callback may have tainted our ability to continue this for loop */
break;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070213/8a7ad510/attachment.html
More information about the launchd-changes
mailing list