From 0255297345be1e2f18c3ec354f5dc2123758c634 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 11 Jan 2010 20:52:55 +0000 Subject: [PATCH] - API: if app can't acquire lock file, tell the client not to restart app for 10 minutes. Hopefully what will happen is: - another instance of app is running in slot dir (shouldn't happen, but sometimes does) - that app will eventually finish, and will write a checkpoint file saying so. It will call boinc_finish(0), but the client won't notice that it has exited. - the next time the client starts the app, it will acquire lock, see that it's done, and call boinc_finish(0). This time the client will notice, and the job will be reported as correct. The downside to all this is that the client won't know that the CPU is in use, and will schedule NCPUS jobs. svn path=/trunk/boinc/; revision=20128 --- api/boinc_api.cpp | 7 ++++++- checkin_notes | 21 +++++++++++++++++++++ doc/docutil.php | 11 ++++++++--- doc/download.php | 2 +- locale/templates/BOINC-Web.pot | 15 ++++++++++++++- 5 files changed, 50 insertions(+), 6 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index f64dabc9e4..af0b759b68 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -415,7 +415,12 @@ int boinc_init_options_general(BOINC_OPTIONS& opt) { windows_error_string(buf, 256); fprintf(stderr, "%s Error: %s\n", boinc_msg_prefix(), buf); #endif - boinc_exit(0); // status=0 means recoverable + // if we can't acquire the lock file there must be + // another app instance running in this slot. + // If we exit(0), the client will keep restarting us. + // Instead, tell the client not to restart us for 10 min. + // + boinc_temporary_exit(600); } } diff --git a/checkin_notes b/checkin_notes index a8251c46c7..1e36f65735 100644 --- a/checkin_notes +++ b/checkin_notes @@ -270,3 +270,24 @@ David 10 Jan 2010 py/Boinc/ tools.py + +David 11 Jan 2010 + - API: if app can't acquire lock file, tell the client not + to restart app for 10 minutes. + Hopefully what will happen is: + - another instance of app is running in slot dir + (shouldn't happen, but sometimes does) + - that app will eventually finish, and will write + a checkpoint file saying so. + It will call boinc_finish(0), but the client won't notice + that it has exited. + - the next time the client starts the app, + it will acquire lock, see that it's done, + and call boinc_finish(0). + This time the client will notice, + and the job will be reported as correct. + The downside to all this is that the client won't know + that the CPU is in use, and will schedule NCPUS jobs. + + api/ + boinc_api.cpp diff --git a/doc/docutil.php b/doc/docutil.php index af4592666b..bfc8849fa3 100644 --- a/doc/docutil.php +++ b/doc/docutil.php @@ -98,7 +98,7 @@ function page_tail($translatable=false, $is_main=false) { if (!$is_main) { echo "
- Return to BOINC main page + ".tra("Return to BOINC main page")."

"; } @@ -107,8 +107,13 @@ function page_tail($translatable=false, $is_main=false) { "; if ($translatable) { - echo " - This page is translatable.
+ echo + sprintf( + tra("This page is %stranslatable%s."), + "", + "" + ), + "
"; } echo " diff --git a/doc/download.php b/doc/download.php index 9dcd7f938e..1c59824c53 100644 --- a/doc/download.php +++ b/doc/download.php @@ -123,7 +123,7 @@ function show_download($pname) { | ".tra("Release notes")." | ".tra("Help")." | ".tra("All versions")." - | Version history + | ".tra("Version history")." "; diff --git a/locale/templates/BOINC-Web.pot b/locale/templates/BOINC-Web.pot index cb1a1a1a7c..e16ecd4d73 100644 --- a/locale/templates/BOINC-Web.pot +++ b/locale/templates/BOINC-Web.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: BOINC $Id$\n" "Report-Msgid-Bugs-To: BOINC translation team \n" -"POT-Creation-Date: 2010-01-10 14:46 PST\n" +"POT-Creation-Date: 2010-01-11 12:46 PST\n" "Last-Translator: Generated automatically from source files\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -20,6 +20,15 @@ msgstr "" msgid "Search" msgstr "" +#: docutil.php:101 +msgid "Return to BOINC main page" +msgstr "" + +#: docutil.php:112 +#, php-format +msgid "This page is %stranslatable%s." +msgstr "" + #: download.php:40 msgid "Download BOINC" msgstr "" @@ -66,6 +75,10 @@ msgstr "" msgid "All versions" msgstr "" +#: download.php:126 +msgid "Version history" +msgstr "" + #: download.php:143 msgid "BOINC: compute for science" msgstr ""