Bug 164181. Prevent multiple instances of CASA Manager on windows.
This commit is contained in:
parent
0cafb12c7a
commit
e9676d12af
@ -1,3 +1,7 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 07:01:10 MST 2006 - jnorman@novell.com
|
||||||
|
- Bug 164181. Prevent multiple instances of CASA Manager on windows.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 12 09:13:10 MST 2006 - jnorman@novell.com
|
Wed Apr 12 09:13:10 MST 2006 - jnorman@novell.com
|
||||||
- Security Audit Report : Patch for Bug No. 5.2.
|
- Security Audit Report : Patch for Bug No. 5.2.
|
||||||
|
@ -259,9 +259,22 @@ public class Common
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if( true == IS_WINDOWS )
|
else if( true == IS_WINDOWS )
|
||||||
{
|
{
|
||||||
bRet = false;
|
|
||||||
//return(false);
|
Process current = Process.GetCurrentProcess();
|
||||||
|
Process[] p = System.Diagnostics.Process.GetProcessesByName("CASAManager");
|
||||||
|
int i = 0;
|
||||||
|
foreach (Process proc in p)
|
||||||
|
{
|
||||||
|
Console.WriteLine(proc.SessionId);
|
||||||
|
if (proc.SessionId == current.SessionId)
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i > 1)
|
||||||
|
bRet = true;
|
||||||
|
else
|
||||||
|
bRet = false;
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user