Merge pull request #39542 from Ev1lbl0w/feature/kill-pid

Allow Godot to kill its own PID
This commit is contained in:
Rémi Verschelde 2020-06-16 20:49:00 +02:00 committed by GitHub
commit fa01e666d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}