- Home /
Mutex on Linux
Hi,
I have created .NET Core server and client applications for both Windows and Linux and have validated that the shared memory and mutexes work. Now I am trying to enable server-side in Unity application but I have hit a snag. Actually, I have hit quite a few snags but was able to solve them. For example, there is no shared memory on Linux so I had to painfully find out I have to pass null as a name. If I want to use named mutexes on Linux I need to put Global\ before the name, e.g. Global\Mutex. But the thing is if I try to do that in Unity the client cannot find the Mutex with that name, however, when I call the same method from .NET Core console app it works normally. I have tried playing with it in lots of ways, but it might be to Mono implementation that doesn't expose the Mutex to other application. I was able to access shared memory created in Unity so that was a victory.
Does anyone know how to expose Mutexes to other C# or C++ application? Thank you for your time.