diff --git a/checkin_notes b/checkin_notes index 19cf9d1f0c..e4bdf853e3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7474,3 +7474,11 @@ David 11 July 2006 client/ main.C + +Rom 12 July 2006 + - Bug Fix: Remove extra waiting loop for Win9x based platforms + when shutting down a console window now that quit_client() + does the waiting. + + client/ + main.C diff --git a/client/main.C b/client/main.C index 8c41f6a453..fbec60003c 100644 --- a/client/main.C +++ b/client/main.C @@ -152,19 +152,15 @@ void resume_client() { // Trap logoff and shutdown events on Win9x so we can clean ourselves up. LRESULT CALLBACK Win9xMonitorSystemWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (uMsg == WM_QUERYENDSESSION) - { + if (uMsg == WM_QUERYENDSESSION) { BOINCTRACE("***** Win9x Monitor System Shutdown/Logoff Event Detected *****\n"); + // Win95 is stupid, we really only need to wait until we have + // successfully shutdown the active tasks and cleaned everything + // up. Luckly WM_QUERYENDSESSION is sent before Win9x checks for any + // existing console and that gives us a chance to clean-up and + // then clear the console window. Win9x will not close down + // a console window if anything is displayed on it. quit_client(); - while (!boinc_cleanup_completed) { - Sleep(1000); // Win95 is stupid, we really only need to wait until we have - // successfully shutdown the active tasks and cleaned everything - // up. Luckly WM_QUERYENDSESSION is sent before Win9x checks for any - // existing console and that gives us a chance to clean-up and - // then clear the console window. Win9x will not close down - // a console window if anything is displayed on it. - } - Sleep(2000); // For good measure. system("cls"); return TRUE; }