diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-16 20:49:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 20:49:00 +0200 |
commit | fa01e666d2d3dd9fe0ca8fbbea19ca2e2458cf29 (patch) | |
tree | f4e62409111e1496b4f43dd4bbe53ae47ed28be7 | |
parent | 93d79023adde71771a3046327846c3cd07c4e29e (diff) | |
parent | 75ce45440a9a2cd6363b5f04205d201dba6dec5d (diff) |
Merge pull request #39542 from Ev1lbl0w/feature/kill-pid
Allow Godot to kill its own PID
-rw-r--r-- | platform/windows/os_windows.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 9c1b8f2949..5b15896b0c 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -208,6 +208,13 @@ void OS_Windows::initialize() { process_map = memnew((Map<ProcessID, ProcessInfo>)); + // 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(); main_loop = nullptr; } |