mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3429
This commit is contained in:
parent
e8d4dd1f62
commit
f0827f0137
|
@ -12582,3 +12582,19 @@ David May 24 2004
|
|||
whetstone.C
|
||||
lib/
|
||||
util.C,h
|
||||
|
||||
David May 24 2004
|
||||
- boinc_delete_file(): Windows: retry 5 times w/ 1 second delay
|
||||
(in case virus-check program has file locked).
|
||||
This may fix a problem where slot directories
|
||||
weren't getting cleaned up.
|
||||
- if clean_out_dirs() fails when starting app,
|
||||
print error message and return error (so app won't start)
|
||||
|
||||
client/
|
||||
app.C
|
||||
cpu_benchmark.h
|
||||
cs_benchmark.C
|
||||
file_names.C
|
||||
lib/
|
||||
filesys.C,h
|
||||
|
|
|
@ -604,7 +604,14 @@ int ACTIVE_TASK_SET::insert(ACTIVE_TASK* atp) {
|
|||
int retval;
|
||||
|
||||
get_slot_dir(atp->slot, atp->slot_dir);
|
||||
clean_out_dir(atp->slot_dir);
|
||||
retval = clean_out_dir(atp->slot_dir);
|
||||
if (retval) {
|
||||
msg_printf(atp->result->project, MSG_ERROR,
|
||||
"ACTIVE_TASK_SET::insert(): can't delete file %s",
|
||||
boinc_failed_file
|
||||
);
|
||||
return retval;
|
||||
}
|
||||
retval = atp->start(true);
|
||||
if (retval) return retval;
|
||||
active_tasks.push_back(atp);
|
||||
|
|
|
@ -44,4 +44,4 @@ extern int destroy_benchmark_timer();
|
|||
extern void dhrystone(double& dps, double& vax_mips);
|
||||
extern void whetstone(double& flops);
|
||||
extern void benchmark_wait_to_start(int which);
|
||||
extern bool benchmark_time_to_stop(int which);
|
||||
extern bool benchmark_time_to_stop(int which);
|
||||
|
|
|
@ -145,9 +145,6 @@ bool benchmark_time_to_stop(int which) {
|
|||
//
|
||||
int cpu_benchmarks(BENCHMARK_DESC* bdp) {
|
||||
HOST_INFO host_info;
|
||||
double fpop_test_secs = 3.3;
|
||||
double iop_test_secs = 3.3;
|
||||
double mem_test_secs = 3.3;
|
||||
double x, y;
|
||||
|
||||
host_info.clear_host_info();
|
||||
|
@ -155,9 +152,6 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
|
|||
dhrystone(x, y);
|
||||
host_info.p_iops = y*1e6;
|
||||
host_info.p_membw = 1e9;
|
||||
//host_info.p_fpop_err = run_double_prec_test(fpop_test_secs, host_info.p_fpops);
|
||||
//host_info.p_iop_err = run_int_test(iop_test_secs, host_info.p_iops);
|
||||
//host_info.p_membw_err = run_mem_bandwidth_test(mem_test_secs, host_info.p_membw);
|
||||
host_info.m_cache = 1e6; // TODO: measure the cache
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -88,9 +88,14 @@ int make_project_dir(PROJECT& p) {
|
|||
|
||||
int remove_project_dir(PROJECT& p) {
|
||||
char buf[256];
|
||||
int retval;
|
||||
|
||||
get_project_dir(&p, buf);
|
||||
clean_out_dir(buf);
|
||||
retval = clean_out_dir(buf);
|
||||
if (retval) {
|
||||
msg_printf(&p, MSG_ERROR, "Can't delete file %s\n", boinc_failed_file);
|
||||
return retval;
|
||||
}
|
||||
return boinc_rmdir(buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef BOOL (CALLBACK* FreeFn)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULAR
|
|||
#include "fcgi_stdio.h"
|
||||
#endif
|
||||
|
||||
char failed_file[256];
|
||||
char boinc_failed_file[256];
|
||||
|
||||
// routines for enumerating the entries in a directory
|
||||
|
||||
|
@ -254,14 +254,17 @@ int boinc_delete_file(const char* path) {
|
|||
if (!boinc_file_exists(path)) {
|
||||
return 0;
|
||||
}
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef _WIN32
|
||||
for (int i=0; i<5; i++) {
|
||||
retval = remove(path);
|
||||
if (!retval) break;
|
||||
boinc_sleep(1.0);
|
||||
}
|
||||
#else
|
||||
retval = unlink(path);
|
||||
#endif
|
||||
#if ( defined(_WIN32) || defined(macintosh) )
|
||||
retval = remove(path);
|
||||
#endif
|
||||
if (retval) {
|
||||
safe_strcpy(failed_file, path);
|
||||
safe_strcpy(boinc_failed_file, path);
|
||||
return ERR_UNLINK;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -74,6 +74,7 @@ extern int lock_file(char*);
|
|||
extern void relative_to_absolute(char* relname, char* path);
|
||||
extern int get_filesystem_info(double& total, double& free);
|
||||
extern int boinc_make_dirs(char*, char*);
|
||||
extern char boinc_failed_file[256];
|
||||
|
||||
class DirScanner {
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Reference in New Issue