diff --git a/checkin_notes b/checkin_notes index a767027a3a..de16f87e5a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5148,8 +5148,8 @@ Charlie 5 June 2009 BOINCClientManager.cpp, .h Charlie 5 June 2009 - - MGR: Implement CBOINCClientManager::KillClient() for Windows. - NOTE: IsBOINCRunning() is not yet working properly on Windows. + - MGR: Implement CBOINCClientManager::KillClient() and IsBOINCRunning() + for Windows. NOTE: I have confirmed that the "ps -a -x -c -o command,pid" command as used in IsBOINCRunning() should works in Ubuntu under VMWare, but it needs to be tested on other Linux platforms. diff --git a/clientgui/BOINCClientManager.cpp b/clientgui/BOINCClientManager.cpp index 120f3ba5c4..5841ad6b7a 100644 --- a/clientgui/BOINCClientManager.cpp +++ b/clientgui/BOINCClientManager.cpp @@ -118,7 +118,6 @@ bool CBOINCClientManager::IsBOINCCoreRunning() { #ifdef __WXMSW__ char buf[MAX_PATH] = ""; - DWORD err = 0; // Global mutex on Win2k and later // if (IsWindows2000Compatible()) { @@ -126,14 +125,12 @@ bool CBOINCClientManager::IsBOINCCoreRunning() { } strcat( buf, RUN_MUTEX); - SetLastError(0); - err = GetLastError(); HANDLE h = CreateMutexA(NULL, true, buf); - err = GetLastError(); + DWORD err = GetLastError(); if ((h==0) || (err == ERROR_ALREADY_EXISTS)) { running = true; - } else { -// ReleaseMutex(h); + } + if (h) { CloseHandle(h); } #else