diff --git a/client/app.C b/client/app.C index db53f7e4b4..9e2ee88475 100644 --- a/client/app.C +++ b/client/app.C @@ -213,9 +213,9 @@ int ACTIVE_TASK::start(bool first_time) { safe_strcpy(exec_path, file_path); } if (first_time) { - sprintf(link_path, "%s%s%s", slot_dir, PATH_SEPARATOR, fip->name); - sprintf(buf, "..%s..%s%s", PATH_SEPARATOR, PATH_SEPARATOR, file_path ); - retval = boinc_link( buf, link_path); + sprintf(link_path, "%s%s%s", slot_dir, PATH_SEPARATOR, strlen(fref.open_name)?fref.open_name:fip->name); + sprintf(buf, "..%s..%s%s", PATH_SEPARATOR, PATH_SEPARATOR, file_path); + retval = boinc_link(buf, link_path); if (log_flags.task_debug) { printf("link %s to %s\n", file_path, link_path); } @@ -640,7 +640,7 @@ bool ACTIVE_TASK::check_max_disk_exceeded() { // bool ACTIVE_TASK::check_max_mem_exceeded() { // TODO: calculate working set size elsewhere - if (working_set_size > max_mem_usage) { + if (working_set_size > max_mem_usage || working_set_size/1048576 > gstate.global_prefs.max_memory_mbytes) { msg_printf(result->project, MSG_INFO, "Aborting result %s: exceeded memory limit %f\n", result->name, max_mem_usage); abort(); diff --git a/client/prefs.C b/client/prefs.C index dd1d83d2cf..86f1e99c45 100644 --- a/client/prefs.C +++ b/client/prefs.C @@ -53,8 +53,9 @@ void GLOBAL_PREFS::init() { max_bytes_sec_up = 1e9; max_bytes_sec_down = 1e9; max_memory_mbytes = 128; + proc_priority = 1; cpu_affinity = -1; - confirm_executable = true; + confirm_executable = false; }; GLOBAL_PREFS::GLOBAL_PREFS() { diff --git a/client/prefs.h b/client/prefs.h index 711c8376e4..6e470984c3 100644 --- a/client/prefs.h +++ b/client/prefs.h @@ -53,6 +53,7 @@ struct GLOBAL_PREFS { double max_bytes_sec_up; double max_bytes_sec_down; int max_memory_mbytes; + int proc_priority; int cpu_affinity; bool confirm_executable;