From 01dee0c92972f28b8ee9e44b67b7236012ea9c51 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 25 Mar 2004 00:10:44 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3159 --- checkin_notes | 10 ++++++++++ client/app.C | 5 +++-- client/cs_apps.C | 5 +++-- lib/diagnostics.C | 12 +++++++----- lib/diagnostics.h | 7 ++++--- lib/error_numbers.h | 2 +- 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/checkin_notes b/checkin_notes index d7113a507c..73e4373a87 100755 --- a/checkin_notes +++ b/checkin_notes @@ -10874,3 +10874,13 @@ David Mar 24 2004 diagnostics.C,h error_numbers.h sighandle.C,h (removed) + +David Mar 24 2004 + - get the above stuff working on Windows + + client/ + app.C + cs_apps.C + lib/ + diagnostics.C,h + error_numbers.h diff --git a/client/app.C b/client/app.C index a36c702190..908e841b08 100644 --- a/client/app.C +++ b/client/app.C @@ -1120,8 +1120,9 @@ int ACTIVE_TASK_SET::restart_tasks() { *(atp->result), ERR_FILE_MISSING, "One or more missing files" ); - active_tasks.erase(iter); + iter = active_tasks.erase(iter); delete atp; + continue; } result->is_active = true; msg_printf(atp->wup->project, MSG_INFO, @@ -1138,7 +1139,7 @@ int ACTIVE_TASK_SET::restart_tasks() { *(atp->result), retval, "Couldn't restart the app for this result: %d", retval ); - active_tasks.erase(iter); + iter = active_tasks.erase(iter); delete atp; } else { iter++; diff --git a/client/cs_apps.C b/client/cs_apps.C index 942a75cdce..b1a88d2d68 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -226,8 +226,9 @@ bool CLIENT_STATE::start_apps() { RESULT* rp; int open_slot; - while ((open_slot = active_tasks.get_free_slot(nslots)) >= 0 && - (rp = next_result_to_start()) != NULL + while ((open_slot = active_tasks.get_free_slot(nslots)) >= 0 + && (rp = next_result_to_start()) + && input_files_available(rp) ){ int retval; // Start the application to compute a result if: diff --git a/lib/diagnostics.C b/lib/diagnostics.C index 4eae86d028..db483711cf 100644 --- a/lib/diagnostics.C +++ b/lib/diagnostics.C @@ -75,13 +75,15 @@ int boinc_init_diag( int dwDiagnosticsFlags ) { // Archive any old stderr.txt and stdout.txt files, if requested if ( g_BOINCDIAG_dwDiagnosticsFlags & BOINC_DIAG_ARCHIVESTDERR ) { - if ( 0 != boinc_copy( BOINC_DIAG_STDERR, BOINC_DIAG_STDERROLD ) ) - BOINCFILEERROR( "Failed to archive existing stderr.txt file" ); + if (boinc_copy( BOINC_DIAG_STDERR, BOINC_DIAG_STDERROLD)) { + //BOINCFILEERROR( "Failed to archive existing stderr.txt file" ); + } } - if ( g_BOINCDIAG_dwDiagnosticsFlags & BOINC_DIAG_ARCHIVESTDOUT ) { - if ( 0 != boinc_copy( BOINC_DIAG_STDOUT, BOINC_DIAG_STDOUTOLD ) ) - BOINCFILEERROR( "Failed to archive existing stdout.txt file" ); + if ( g_BOINCDIAG_dwDiagnosticsFlags & BOINC_DIAG_ARCHIVESTDOUT) { + if (boinc_copy( BOINC_DIAG_STDOUT, BOINC_DIAG_STDOUTOLD )) { + //BOINCFILEERROR( "Failed to archive existing stdout.txt file" ); + } } diff --git a/lib/diagnostics.h b/lib/diagnostics.h index 22bb8d999b..a9382ab3fc 100644 --- a/lib/diagnostics.h +++ b/lib/diagnostics.h @@ -67,6 +67,9 @@ void boinc_info_release(const char *pszFormat, ...); #endif // _DEBUG +#else // non-Win starts here +extern void boinc_set_signal_handler(int sig, RETSIGTYPE (*handler)(int)); +extern void boinc_set_signal_handler_force(int sig, RETSIGTYPE (*handler)(int)); #endif // _WIN32 @@ -120,10 +123,8 @@ void boinc_info_release(const char *pszFormat, ...); // extern int boinc_init_diag(int); extern int boinc_finish_diag(); - extern int boinc_install_signal_handlers(); -extern void boinc_set_signal_handler(int sig, RETSIGTYPE (*handler)(int)); -extern void boinc_set_signal_handler_force(int sig, RETSIGTYPE (*handler)(int)); + // Diagnostic Flags // diff --git a/lib/error_numbers.h b/lib/error_numbers.h index 18ff561fc9..8af5b3d258 100755 --- a/lib/error_numbers.h +++ b/lib/error_numbers.h @@ -112,4 +112,4 @@ #define ERR_NO_EXIT_STATUS -162 // exit_status not found in scheduler request #define ERR_FILE_MISSING -163 -#define ERR_NESTED_UNHANDLED_EXCEPTION -164 +#define ERR_NESTED_UNHANDLED_EXCEPTION_DETECTED -164