[Mono-list] Named Mutexes - Bug?

Dick Porter dick at ximian.com
Thu Jul 21 09:24:08 EDT 2005


On Thu, 2005-07-21 at 11:57 +1200, Ralph Mason wrote:
> In My windows applications I used a named mutex to check for a single 
> instance       
> Under mono the first time this runs it's ok, after that the mutex always 
> lives (even when no instances  (even after the first application is 
> dead), So you can basically only start the app once.

It's a slight difference in behaviour that will be fixed eventually when
I have time.  If you really need to ensure only one instance is running,
try calling mutex.WaitOne(0, false) and checking the return value.

- Dick





More information about the Mono-list mailing list