*** empty log message ***

svn path=/trunk/boinc/; revision=3363
This commit is contained in:
David Anderson 2004-05-11 04:39:25 +00:00
parent a0ad1eb4d7
commit 47da270349
5 changed files with 30 additions and 6 deletions

View File

@ -12115,9 +12115,9 @@ David May 5 2004
Makefile.am,in
Rom May 5 2004
- Our exit stragety should be the same for Windows and Unix. The signal
handler should use the same global flags as Windows for suspending
and resuming activities.
- Our exit strategy should be the same for Windows and Unix.
The signal handler should use the same global flags as Windows
for suspending and resuming activities.
client/
main.C
@ -12138,3 +12138,19 @@ Rom May 6 2004
failure_result_summary_by_platform.php
index.php
pass_percentage_by_platform.php
David May 10 2004
- extend the set of signals that are treated as "external",
i.e. if an app exits with one of these, put it in limbo
rather than treating it as error:
SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGTERM, SiGSTOP
Note: some of these should in principle never happen
because they're caught by the API.
But it doesn't hurt to be safe.
- update_average(): avoid divides by zero
client/
app.C
lib/
exception.h
util.C

View File

@ -752,7 +752,13 @@ bool ACTIVE_TASK_SET::check_app_exited() {
// if the process was externally killed, allow it to restart.
//
if (signal==SIGKILL || signal==SIGQUIT) {
switch(signal) {
case SIGHUP:
case SIGINT:
case SIGQUIT:
case SIGKILL:
case SIGTERM:
case SIGSTOP:
atp->state = PROCESS_IN_LIMBO;
return true;
}

View File

@ -41,6 +41,7 @@ How to develop or port an application program for use with BOINC.
<li><a href=api.php>The BOINC API</a>
<li><a href=graphics.php>The BOINC graphics API</a>
<li><a href=app_dev.php>Application development</a>
<li><a href=fortran.php>FORTRAN applications</a>
</ul>
<font size=+1><b>

View File

@ -23,6 +23,7 @@
#ifndef _WIN32
#include <string>
using namespace std;
using std::exception;
#endif

View File

@ -612,14 +612,14 @@ void update_average(
if (avg_time) {
double diff = now - avg_time;
if (diff==0) diff=3600; // just in case
double diff_days = diff/SECONDS_PER_DAY;
double weight = exp(-diff*M_LN2/half_life);
avg *= weight;
avg += (1-weight)*(work/diff_days);
} else {
} else if (work) {
double dd = (now - work_start_time)/SECONDS_PER_DAY;
avg = work/dd;
}
avg_time = now;
}