1

There is a global mutex used by different applications. If one application blocks this mutex then other applications will not be able to start. Given the mutex name how can I find out in C# which process is owning this mutex currently. I need to build a utility to findout this process and kill which is holding this mutex.

Kamal Kr
  • 687
  • 1
  • 10
  • 22
  • 2
    [Win32: How to get the process/thread that owns a mutex?](http://stackoverflow.com/questions/1947312/win32-how-to-get-the-process-thread-that-owns-a-mutex) – Jason Evans Feb 29 '16 at 10:20

1 Answers1

0

By the looks of it, there's no simple c# only way to do so:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/6d50f1f5-1550-44db-82b0-8be527933b2c/how-to-find-the-process-that-owns-a-mutex?forum=csharpgeneral

There's nothing in .NET to tell who "owns" a mutex. You'd have to PInvoke a set of functions with some very complicated code to get the current owner of a mutex.

Carlos
  • 5,991
  • 6
  • 43
  • 82