From ad41bacb4827ab98508013d7008b7c5764b4efce Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 12 Feb 2018 16:35:23 +0100 Subject: [PATCH] Fix "terminate process" on Windows CloseHandle() does not terminate the process. TerminateProcess() does. --- app/src/sys/win/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/sys/win/command.c b/app/src/sys/win/command.c index 523cccd6..031f77e2 100644 --- a/app/src/sys/win/command.c +++ b/app/src/sys/win/command.c @@ -28,7 +28,7 @@ HANDLE cmd_execute(const char *path, const char *const argv[]) { } SDL_bool cmd_terminate(HANDLE handle) { - return CloseHandle(handle); + return TerminateProcess(handle, 1) && CloseHandle(handle); } SDL_bool cmd_simple_wait(HANDLE handle, DWORD *exit_code) {