From 035d6c8b83c672e37ec15cf8f214808a19fb48e3 Mon Sep 17 00:00:00 2001 From: Voltstro Date: Sat, 26 Oct 2024 14:41:28 +1000 Subject: [PATCH] Fix Windows job handle names being the same --- .../Runtime/Core/Engines/Process/WindowProcess.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Packages/UnityWebBrowser/Runtime/Core/Engines/Process/WindowProcess.cs b/src/Packages/UnityWebBrowser/Runtime/Core/Engines/Process/WindowProcess.cs index 08fea8d..b0c2b31 100644 --- a/src/Packages/UnityWebBrowser/Runtime/Core/Engines/Process/WindowProcess.cs +++ b/src/Packages/UnityWebBrowser/Runtime/Core/Engines/Process/WindowProcess.cs @@ -21,7 +21,7 @@ public WindowProcess() { //Job handle code from SO //https://stackoverflow.com/questions/3342941/kill-child-process-when-parent-process-is-killed - string jobName = "UWBChildProcesses" + System.Diagnostics.Process.GetCurrentProcess().Id; + string jobName = "UWBChildProcesses" + new Guid().ToString("N"); jobHandle = CreateJobObject(IntPtr.Zero, jobName); JOBOBJECT_BASIC_LIMIT_INFORMATION info = new()