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"); } }