From 5126e0aab38f902d6c54c517c9986ff0d0539afd Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 30 Aug 2021 03:21:05 +0300 Subject: [PATCH] Retrieve process exit codes on Windows --- source/core/windows/process.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/core/windows/process.cpp b/source/core/windows/process.cpp index da76fe3..8293650 100644 --- a/source/core/windows/process.cpp +++ b/source/core/windows/process.cpp @@ -109,6 +109,9 @@ bool Process::wait(bool block) { running = false; finished = true; + DWORD ec; + if(GetExitCodeProcess(priv->info.hProcess, &ec)) + exit_code = ec; } return finished; -- 2.45.2