client: print descendant PIDs on exit or abort

This commit is contained in:
David Anderson 2015-06-29 21:36:20 -07:00
parent 033d67d927
commit 80a084d8d6
1 changed files with 3 additions and 5 deletions

View File

@ -180,7 +180,9 @@ bool ACTIVE_TASK::kill_all_children() {
#endif
static void print_descendants(int pid, vector<int>desc, const char* where) {
msg_printf(0, MSG_INFO, "%s: PID %d has %d descendants", where, pid, desc.size());
msg_printf(0, MSG_INFO, "%s: PID %d has %d descendants",
where, pid, (int)desc.size()
);
for (unsigned int i=0; i<desc.size(); i++) {
msg_printf(0, MSG_INFO, " PID %d", desc[i]);
}
@ -198,11 +200,9 @@ int ACTIVE_TASK::request_exit() {
set_task_state(PROCESS_QUIT_PENDING, "request_exit()");
quit_time = gstate.now;
get_descendants(pid, descendants);
#if 0
if (log_flags.task_debug) {
print_descendants(pid, descendants, "request_exit()");
}
#endif
return 0;
}
@ -218,11 +218,9 @@ int ACTIVE_TASK::request_abort() {
set_task_state(PROCESS_ABORT_PENDING, "request_abort");
abort_time = gstate.now;
get_descendants(pid, descendants);
#if 0
if (log_flags.task_debug) {
print_descendants(pid, descendants, "request_abort()");
}
#endif
return 0;
}