From 3f8cc63c8f565df86b6c28be66785d3252fcd4c3 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 28 Mar 2011 17:53:43 +0000 Subject: [PATCH] - API: Flush buffers before terminating. - SCR: Flush buffers before terminating. api/ boinc_api.cpp clientscr/ screensaver_win.cpp svn path=/trunk/boinc/; revision=23286 --- api/boinc_api.cpp | 4 ++-- checkin_notes | 9 +++++++++ clientscr/screensaver_win.cpp | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index 49eb1a7535..fad872cccb 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -549,8 +549,6 @@ void boinc_exit(int status) { } } - fflush(NULL); - boinc_finish_diag(); // various platforms have problems shutting down a process @@ -558,6 +556,8 @@ void boinc_exit(int status) { // or triggering endless exit()/atexit() loops. // BOINCINFO("Exit Status: %d", status); + fflush(NULL); + #if defined(_WIN32) // Halt all the threads and cleans up. TerminateProcess(GetCurrentProcess(), status); diff --git a/checkin_notes b/checkin_notes index ae41fb7fe8..10d21276ad 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1899,3 +1899,12 @@ Rom 28 Mar 2011 clientgui/ sg_DlgMessages.cpp, .h + +Rom 28 Mar 2011 + - API: Flush buffers before terminating. + - SCR: Flush buffers before terminating. + + api/ + boinc_api.cpp + clientscr/ + screensaver_win.cpp diff --git a/clientscr/screensaver_win.cpp b/clientscr/screensaver_win.cpp index e120c95df9..f19a45713b 100644 --- a/clientscr/screensaver_win.cpp +++ b/clientscr/screensaver_win.cpp @@ -93,6 +93,7 @@ INT WINAPI WinMain( // Instruct the OS to terminate the screensaver by any // means nessassary. + fflush(NULL); TerminateProcess(GetCurrentProcess(), retval); return retval;