mirror of https://github.com/BOINC/boinc.git
fflush before _exit()
svn path=/trunk/boinc/; revision=8516
This commit is contained in:
parent
4217228def
commit
2b31d91773
|
@ -385,7 +385,7 @@ void boinc_exit(int status) {
|
|||
// This is not pretty but unless someone finds a cleaner solution,
|
||||
// we handle the Mac-case separately .
|
||||
#ifdef __APPLE_CC__
|
||||
fflush(stderr);
|
||||
fflush(NULL);
|
||||
_exit(status);
|
||||
#else
|
||||
exit(status);
|
||||
|
|
|
@ -12773,3 +12773,15 @@ David 5 Oct 2005
|
|||
Rom 5 Oct 2005 (staging)
|
||||
- Tag for 5.1.7 release, all platforms
|
||||
boinc_core_release_5_1_7
|
||||
|
||||
David 5 Oct 2005
|
||||
- before any _exit() (API, app start, etc.) do a fflush(NULL)
|
||||
(from Bruce Allen)
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
client/
|
||||
app_start.C
|
||||
cs_benchmark.C
|
||||
clientgui/mac/
|
||||
mac_saver_module.cpp
|
||||
|
|
|
@ -442,6 +442,7 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
retval = chdir(slot_dir);
|
||||
if (retval) {
|
||||
perror("chdir");
|
||||
fflush(NULL);
|
||||
_exit(retval);
|
||||
}
|
||||
|
||||
|
@ -460,6 +461,7 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
"execv(%s) failed: %s\n", buf, boincerror(retval)
|
||||
);
|
||||
perror("execv");
|
||||
fflush(NULL);
|
||||
_exit(errno);
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ DWORD WINAPI win_cpu_benchmarks(LPVOID p) {
|
|||
#endif
|
||||
|
||||
void CLIENT_STATE::start_cpu_benchmarks() {
|
||||
int i;
|
||||
int i, retval;
|
||||
|
||||
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_MEASUREMENT);
|
||||
|
||||
|
@ -208,7 +208,9 @@ void CLIENT_STATE::start_cpu_benchmarks() {
|
|||
sprintf(benchmark_descs[i].filename, "%s_%d.xml", CPU_BENCHMARKS_FILE_NAME, i);
|
||||
PROCESS_ID pid = fork();
|
||||
if (pid == 0) {
|
||||
_exit(cpu_benchmarks(benchmark_descs+i));
|
||||
retval = cpu_benchmarks(benchmark_descs+i);
|
||||
fflush(NULL);
|
||||
_exit(retval);
|
||||
} else {
|
||||
benchmark_descs[i].pid = pid;
|
||||
}
|
||||
|
|
|
@ -208,10 +208,12 @@ OSStatus initBOINCApp() {
|
|||
status = chdir(buf);
|
||||
if (status) {
|
||||
perror("chdir");
|
||||
fflush(NULL);
|
||||
_exit(status);
|
||||
}
|
||||
|
||||
status = execl(boincPath, "boinc", "-redirectio", (char *) 0);
|
||||
fflush(NULL);
|
||||
_exit(127); // execl error (execl should never return)
|
||||
} else {
|
||||
CoreClientPID = myPid; // make this available globally
|
||||
|
|
Loading…
Reference in New Issue