https://bugzilla.novell.com/show_bug.cgi?id=349680
Summary: Unreleased and Un-closed Mutex keeps app from exiting.
Product: Mono: Class Libraries
Version: 1.2.4
Platform: i386
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
Found By: ---
Description of Problem:
Mutex class acts differently from MS on exit.
Steps to reproduce the problem:
1. Run the app below. It should exit properly
2. Now remove the onlyOne.ReleaseMutex(); line. The app does not completely
exit
Actual Results:
Sometimes app hangs on exit and does not return to the shell.
Expected Results:
Exit and return to shell
How often does this happen?
Mostly every time.
Additional Information:
static void Main()
{
// allow only one instance of the process
Mutex onlyOne = new Mutex(true, Process.GetCurrentProcess().ProcessName);
if (onlyOne.WaitOne(0, false)) {
try {
new Program();
}
finally {
onlyOne.ReleaseMutex();
onlyOne.Close();
onlyOne = null;
}
}
}
Sometimes, depending on what is in the Program() if the "onlyOne = null" is not
present the app does not exit either.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs