mirror of https://github.com/BOINC/boinc.git
parent
e7363cc6fc
commit
72a4ae4fe8
|
@ -622,7 +622,7 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int write_fraction_done_file(double pct, double cpu, double checkpoint_cpu) {
|
int write_fraction_done_file(double pct, double cpu, double checkpoint_cpu) {
|
||||||
FILE* f = fopen(FRACTION_DONE_FILE, "w");
|
FILE* f = fopen(FRACTION_DONE_TEMP_FILE, "w");
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -637,6 +637,11 @@ int write_fraction_done_file(double pct, double cpu, double checkpoint_cpu) {
|
||||||
);
|
);
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
#ifdef _WIN32
|
||||||
|
unlink(FRACTION_DONE_FILE);
|
||||||
|
#endif
|
||||||
|
rename(FRACTION_DONE_TEMP_FILE, FRACTION_DONE_FILE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ int parse_suspend_quit_file(FILE* f, bool& suspend, bool& quit);
|
||||||
#define GRAPHICS_DATA_FILE "graphics.xml"
|
#define GRAPHICS_DATA_FILE "graphics.xml"
|
||||||
#define FD_INIT_FILE "fd_init.xml"
|
#define FD_INIT_FILE "fd_init.xml"
|
||||||
#define FRACTION_DONE_FILE "fraction_done.xml"
|
#define FRACTION_DONE_FILE "fraction_done.xml"
|
||||||
|
#define FRACTION_DONE_TEMP_FILE "fraction_done.tmp"
|
||||||
#define SUSPEND_QUIT_FILE "suspend.xml"
|
#define SUSPEND_QUIT_FILE "suspend.xml"
|
||||||
#define STDERR_FILE "stderr.txt"
|
#define STDERR_FILE "stderr.txt"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue