mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4167
This commit is contained in:
parent
ff8e00536a
commit
c359410f44
|
@ -17122,3 +17122,10 @@ David 7 Sept 2004
|
||||||
|
|
||||||
client/
|
client/
|
||||||
hostinfo_unix.C
|
hostinfo_unix.C
|
||||||
|
|
||||||
|
Rom 8 Sep 2004
|
||||||
|
- If we can lock the lockfile, also aquire the global mutex. If we don't the screensaver
|
||||||
|
cannot properly detect that BOINC is executing.
|
||||||
|
|
||||||
|
client/
|
||||||
|
file_names.C
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "boinc_win.h"
|
#include "boinc_win.h"
|
||||||
|
#include "win_util.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -127,6 +128,17 @@ int check_unique_instance() {
|
||||||
if (lock_file(LOCK_FILE_NAME)) {
|
if (lock_file(LOCK_FILE_NAME)) {
|
||||||
return ERR_ALREADY_RUNNING;
|
return ERR_ALREADY_RUNNING;
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HANDLE h = CreateMutex(NULL, true, RUN_MUTEX);
|
||||||
|
if ((h==0) || (GetLastError() == ERROR_ALREADY_EXISTS)) {
|
||||||
|
UINT nShowMsg = RegisterWindowMessage(SHOW_WIN_MSG);
|
||||||
|
PostMessage(HWND_BROADCAST, nShowMsg, 0, 0);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
key_t key;
|
key_t key;
|
||||||
char path[256];
|
char path[256];
|
||||||
|
|
Loading…
Reference in New Issue