]> git.tdb.fi Git - libs/core.git/commitdiff
Retrieve process exit codes on Windows
authorMikko Rasa <tdb@tdb.fi>
Mon, 30 Aug 2021 00:21:05 +0000 (03:21 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 30 Aug 2021 00:25:18 +0000 (03:25 +0300)
source/core/windows/process.cpp

index da76fe38dd3551f82dbfd3910d995a0058191108..829365088115289bcdedc0ebc315911f3bf3175c 100644 (file)
@@ -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;