You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Acquiring a global named mutex doesn't seem to work on MacOS and Linux when the application is compiled with NativeAOT.
Reproduction Steps
internal static class Program
{
private static void Main(string[] args)
{
using (var mutex = new Mutex(false, "Global\\{604074dc-be47-4a35-b79d-b79eead0c022}"))
{
mutex.WaitOne();
Console.WriteLine("The app is now running...");
Console.ReadLine();
}
}
}
Description
Acquiring a global named mutex doesn't seem to work on MacOS and Linux when the application is compiled with NativeAOT.
Reproduction Steps
Compile to native using the following:
Expected behavior
The second instance of the program blocks and waits until the first has terminated
Actual behavior
The second instance successfully acquires the mutex.
Regression?
No response
Known Workarounds
No response
Configuration
Other information
The same works if the application is not compiled to native code but simply build in release mode:
The text was updated successfully, but these errors were encountered: