From 4d7ac36e840de89d33e6ac7e272e0893f111cf5a Mon Sep 17 00:00:00 2001 From: Ev1lbl0w Date: Mon, 11 May 2020 15:26:10 +0100 Subject: [PATCH] Allow Godot to kill it's own PID (cherry picked from commit 75ce45440a9a2cd6363b5f04205d201dba6dec5d) --- platform/windows/os_windows.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 08bdd670d24..cd14e58fbe1 100755 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -255,6 +255,13 @@ void OS_Windows::initialize_core() { process_map = memnew((Map)); + // Add current Godot PID to the list of known PIDs + ProcessInfo current_pi = {}; + PROCESS_INFORMATION current_pi_pi = {}; + current_pi.pi = current_pi_pi; + current_pi.pi.hProcess = GetCurrentProcess(); + process_map->insert(GetCurrentProcessId(), current_pi); + IP_Unix::make_default(); cursor_shape = CURSOR_ARROW;