From d1db358a569d336e1fb9f6f2a2c7c019c7121d2a Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Sat, 19 Jul 2014 19:04:06 -0400 Subject: [PATCH] client: Make sure handle_temporary_exit() cleans up any descendents and any other processes of interest determined by other_pid. --- client/app_control.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/app_control.cpp b/client/app_control.cpp index a8f60105bb..55abc9063e 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -362,6 +362,11 @@ void ACTIVE_TASK::handle_temporary_exit( premature_exit_count++; if (premature_exit_count > 100) { will_restart = false; + + // Cleanup any descendents and proccess designated as other_pids of interest + // which may not have been cleaned up + kill_task(will_restart); + set_task_state(PROCESS_ABORTED, "handle_temporary_exit"); result->exit_status = ERR_TOO_MANY_EXITS; gstate.report_result_error(*result, "too many boinc_temporary_exit()s"); @@ -381,6 +386,11 @@ void ACTIVE_TASK::handle_temporary_exit( will_restart = true; result->schedule_backoff = gstate.now + backoff; safe_strcpy(result->schedule_backoff_reason, reason); + + // Cleanup any descendents and proccess designated as other_pids of interest + // which may not have been cleaned up + kill_task(will_restart); + set_task_state(PROCESS_UNINITIALIZED, "handle_temporary_exit"); } }