[Mono-bugs] [Bug 349680] New: Unreleased and Un-closed Mutex keeps app from exiting.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Dec 18 19:46:41 EST 2007
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: mono-bugs at ximian.com
ReportedBy: jaebird at gmail.com
QAContact: mono-bugs at ximian.com
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.
More information about the mono-bugs
mailing list