diff options
Diffstat (limited to 'indra/llvfs/llpidlock.cpp')
-rwxr-xr-x | indra/llvfs/llpidlock.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp index 93ac120302..28cee29405 100755 --- a/indra/llvfs/llpidlock.cpp +++ b/indra/llvfs/llpidlock.cpp @@ -41,6 +41,15 @@ #include "llframetimer.h" #if LL_WINDOWS //For windows platform. + +#include <windows.h> + +namespace { + inline DWORD getpid() { + return GetCurrentProcessId(); + } +} + bool isProcessAlive(U32 pid) { return (bool) GetProcessVersion((DWORD)pid); @@ -59,10 +68,14 @@ class LLPidLockFile { public: LLPidLockFile( ) : - mSaving(FALSE), mWaiting(FALSE), - mClean(TRUE), mPID(getpid()) + mAutosave(false), + mSaving(false), + mWaiting(false), + mPID(getpid()), + mNameTable(NULL), + mClean(true) { - mLockName = gDirUtilp->getTempDir() + "/savelock"; + mLockName = gDirUtilp->getTempDir() + gDirUtilp->getDirDelimiter() + "savelock"; } bool requestLock(LLNameTable<void *> *name_table, bool autosave, bool force_immediate=FALSE, F32 timeout=300.0); |