From: Mikko Rasa Date: Mon, 30 Aug 2021 00:21:05 +0000 (+0300) Subject: Retrieve process exit codes on Windows X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5126e0aab38f902d6c54c517c9986ff0d0539afd;p=libs%2Fcore.git Retrieve process exit codes on Windows --- 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;