marzent / IINACT

A Dalamud plugin to run the FFXIV_ACT_Plugin in an ACT-like enviroment with a heavily modified port of Overlay Plugin
https://www.iinact.com
GNU General Public License v3.0
182 stars 41 forks source link

Use a named mutex to implement duplicate process detection. #18

Closed nopjmp closed 1 year ago

nopjmp commented 1 year ago

Global\ is a special prefix that is used to designate that this should be used across all sessions instead of a session specific. This may cause issues with folks that are wanting to use the RPCAP across multiple clients.

If someone wants to support that, Local\ is the appropriate named mutex. See the Microsoft docs for remarks on the naming convention.

This should work across all platforms with new enough .NET 6 and .NET 7.

https://github.com/dotnet/coreclr/pull/5030 PR reference https://github.com/dotnet/runtime/pulls?q=named+mutex to find bugs

https://learn.microsoft.com/en-us/dotnet/api/system.threading.mutex.-ctor?view=net-6.0