From 3fe5da73bdd4e361759122e32e3f4899a48ae6d7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Apr 2013 01:18:57 -0700 Subject: [PATCH] - client: if a job's finish file has been there > 10 sec, do atp->abort_task() rather than atp->kill_task(); the latter will restart it infinitely on Unix - client: prefix timestamp to stderr messages --- client/app_control.cpp | 6 ++++-- client/main.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/app_control.cpp b/client/app_control.cpp index 8bd7ff1051..598073f7d9 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -121,7 +121,7 @@ bool ACTIVE_TASK_SET::poll() { } // Check for finish files every 10 sec. - // If we already found a finish file, kill the app; + // If we already found a finish file, abort the app; // it must be hung somewhere in boinc_finish(); // static double last_finish_check_time = 0; @@ -131,7 +131,9 @@ bool ACTIVE_TASK_SET::poll() { ACTIVE_TASK* atp = active_tasks[i]; if (atp->task_state() == PROCESS_UNINITIALIZED) continue; if (atp->finish_file_time) { - atp->kill_task(false); + // process is still there 10 sec after it wrote finish file. + // abort the job + atp->abort_task(EXIT_ABORTED_BY_CLIENT, "finish file present too long"); } else if (atp->finish_file_present()) { atp->finish_file_time = gstate.now; } diff --git a/client/main.cpp b/client/main.cpp index 6e14606cdb..c358280546 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -110,8 +110,8 @@ void log_message_error(const char* msg) { ); #else snprintf(evt_msg, sizeof(evt_msg), - "%s\n", - msg + "%s %s\n", + time_string, msg ); #endif if (!gstate.executing_as_daemon) {