mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=6438
This commit is contained in:
parent
cac38b6d17
commit
2356ffff55
|
@ -8518,3 +8518,16 @@ David 25 June 2005
|
|||
|
||||
client/
|
||||
cs_scheduler.C
|
||||
|
||||
David 25 June 2005
|
||||
- add an exit_status parameter to ACTIVE_TASK::abort_task.
|
||||
This may be either ERR_ABORTED_VIA_GUI or ERR_RSC_LIMIT_EXCEEDED
|
||||
Without this, results aborted for either reason
|
||||
end up with exit_status = ERR_RESULT_START
|
||||
(bug reported by Bruce Allen)
|
||||
|
||||
client/
|
||||
app.h
|
||||
app_control.C
|
||||
client_state.C
|
||||
gui_rpc_server_C
|
||||
|
|
20
client/app.h
20
client/app.h
|
@ -148,13 +148,21 @@ public:
|
|||
void close_process_handles();
|
||||
void cleanup_task();
|
||||
|
||||
int start(bool first_time); // start the task running
|
||||
int request_exit(); // Send a SIGQUIT signal or equivalent
|
||||
int start(bool first_time); // start a process
|
||||
int request_exit();
|
||||
// ask the process to exit gracefully,
|
||||
// i.e. by sending a <quit> message
|
||||
bool process_exists();
|
||||
int kill_task(); // send a SIGKILL signal or equivalent
|
||||
int suspend(); // send a SIGSTOP signal or equivalent
|
||||
int unsuspend(); // send a SIGCONT signal or equivalent
|
||||
int abort_task(const char*); // flag as abort pending and send kill signal
|
||||
int kill_task();
|
||||
// Kill process forcibly,
|
||||
// Unix: send a SIGKILL signal, Windows: TerminateProcess()
|
||||
int suspend();
|
||||
// ask a process to stop executing (but stay in mem)
|
||||
// Done by sending it a <suspend> message
|
||||
int unsuspend();
|
||||
// Undo a suspend: send a <resume> message
|
||||
int abort_task(int exit_status, const char*);
|
||||
// can be called whether or not process exists
|
||||
bool has_task_exited(); // return true if this task has exited
|
||||
int preempt(bool quit_task); // preempt (via suspend or quit) a running task
|
||||
int resume_or_start();
|
||||
|
|
|
@ -441,7 +441,7 @@ bool ACTIVE_TASK::check_max_cpu_exceeded() {
|
|||
"Aborting result %s: exceeded CPU time limit %f\n",
|
||||
result->name, max_cpu_time
|
||||
);
|
||||
abort_task("Maximum CPU time exceeded");
|
||||
abort_task(ERR_RSC_LIMIT_EXCEEDED, "Maximum CPU time exceeded");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -465,7 +465,7 @@ bool ACTIVE_TASK::check_max_disk_exceeded() {
|
|||
"Aborting result %s: exceeded disk limit: %f > %f\n",
|
||||
result->name, disk_usage, max_disk_usage
|
||||
);
|
||||
abort_task("Maximum disk usage exceeded");
|
||||
abort_task(ERR_RSC_LIMIT_EXCEEDED, "Maximum disk usage exceeded");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ bool ACTIVE_TASK::check_max_mem_exceeded() {
|
|||
result->name,
|
||||
min(max_mem_usage, gstate.global_prefs.max_memory_mbytes*1048576)
|
||||
);
|
||||
abort_task("Maximum memory usage exceeded");
|
||||
abort_task(ERR_RSC_LIMIT_EXCEEDED, "Maximum memory usage exceeded");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -500,7 +500,7 @@ bool ACTIVE_TASK::check_max_mem_exceeded() {
|
|||
rss_bytes,
|
||||
max_mem_usage
|
||||
);
|
||||
//abort_task("Maximum memory usage exceeded");
|
||||
//abort_task(ERR_RSC_LIMIT_EXCEEDED, "Maximum memory usage exceeded");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -546,13 +546,14 @@ bool ACTIVE_TASK_SET::check_rsc_limits_exceeded() {
|
|||
// If process is running, send it a kill signal
|
||||
// This is done when app has exceeded CPU, disk, or mem limits
|
||||
//
|
||||
int ACTIVE_TASK::abort_task(const char* msg) {
|
||||
int ACTIVE_TASK::abort_task(int exit_status, const char* msg) {
|
||||
if (task_state == PROCESS_EXECUTING || task_state == PROCESS_SUSPENDED) {
|
||||
task_state = PROCESS_ABORT_PENDING;
|
||||
kill_task();
|
||||
} else {
|
||||
task_state = PROCESS_ABORTED;
|
||||
}
|
||||
result->exit_status = exit_status;
|
||||
gstate.report_result_error(*result, msg);
|
||||
return 0;
|
||||
}
|
||||
|
@ -817,7 +818,7 @@ void ACTIVE_TASK_SET::kill_tasks(PROJECT* proj) {
|
|||
}
|
||||
}
|
||||
|
||||
// suspend a task
|
||||
// send a <suspend> message
|
||||
//
|
||||
int ACTIVE_TASK::suspend() {
|
||||
if (!app_client_shm.shm) return 0;
|
||||
|
|
|
@ -1065,9 +1065,7 @@ bool CLIENT_STATE::time_to_exit() {
|
|||
// (so don't crash over and over)
|
||||
// - Append a description of the error to result.stderr_out
|
||||
//
|
||||
int CLIENT_STATE::report_result_error(
|
||||
RESULT& res, const char* format, ...
|
||||
) {
|
||||
int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) {
|
||||
char buf[MAX_BLOB_LEN], err_msg[MAX_BLOB_LEN];
|
||||
unsigned int i;
|
||||
int failnum;
|
||||
|
|
|
@ -391,7 +391,7 @@ static void handle_result_op(char* buf, MIOFILE& fout, const char* op) {
|
|||
if (!strcmp(op, "abort")) {
|
||||
atp = gstate.lookup_active_task_by_result(rp);
|
||||
if (atp) {
|
||||
atp->abort_task("aborted via GUI RPC");
|
||||
atp->abort_task(ERR_ABORTED_VIA_GUI, "aborted via GUI RPC");
|
||||
} else {
|
||||
rp->aborted_via_gui = true;
|
||||
}
|
||||
|
|
|
@ -118,10 +118,10 @@ function show_version($pname, $i, $v) {
|
|||
<a href=dl/$file><b>Download</b></a> ($s MB)
|
||||
</td>
|
||||
<td>
|
||||
$type
|
||||
Instructions: $type
|
||||
</td>
|
||||
<td width=1%>
|
||||
<a href=download.php?platform=$pname&i=$i>details</a>
|
||||
<a href=download.php?platform=$pname&i=$i><nobr>version details</nobr></a>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
|
|
@ -128,7 +128,7 @@ $w419 = array(
|
|||
|
||||
$m443 = array(
|
||||
"num"=>"4.43",
|
||||
"status"=>"Recommended version (advanced GUI)",
|
||||
"status"=>"Recommended version (standard GUI)",
|
||||
"file"=>"boinc_4.43_macOSX.zip",
|
||||
"date"=>"21 May 2005",
|
||||
"type"=>mac_advanced(),
|
||||
|
@ -141,7 +141,7 @@ $m443 = array(
|
|||
|
||||
$m443c = array(
|
||||
"num"=>"4.43",
|
||||
"status"=>"Recommended version (command line, no GUI)",
|
||||
"status"=>"Unix command-line version",
|
||||
"file"=>"boinc_4.43_powerpc-apple-darwin.zip",
|
||||
"date"=>"21 May 2005",
|
||||
"type"=>bare_core(),
|
||||
|
|
Loading…
Reference in New Issue