diff --git a/ShareX.HelpersLib/SingleInstanceApplication/ApplicationInstanceManager.cs b/ShareX.HelpersLib/SingleInstanceApplication/ApplicationInstanceManager.cs index 4531ee38e..dfe677101 100644 --- a/ShareX.HelpersLib/SingleInstanceApplication/ApplicationInstanceManager.cs +++ b/ShareX.HelpersLib/SingleInstanceApplication/ApplicationInstanceManager.cs @@ -34,10 +34,13 @@ namespace SingleInstanceApplication { public static class ApplicationInstanceManager { + private static Semaphore semaphore; + [DebuggerStepThrough] public static bool CreateSingleInstance(string name, EventHandler callback, string[] args) { string eventName = string.Format("{0}-{1}", Environment.MachineName, name); + string semaphoreName = string.Format("{0}{1}", eventName, "Semaphore"); InstanceProxy.IsFirstInstance = false; InstanceProxy.CommandLineArgs = args; @@ -46,9 +49,13 @@ public static bool CreateSingleInstance(string name, EventHandler