Bug 164181. Prevent multiple instances of CASA Manager on windows.

This commit is contained in:
Jim Norman 2006-04-13 13:04:06 +00:00
parent 0cafb12c7a
commit e9676d12af
2 changed files with 20 additions and 3 deletions

View File

@ -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
- Security Audit Report : Patch for Bug No. 5.2.

View File

@ -259,9 +259,22 @@ public class Common
}
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;
}