fix: Forwarder not correctly returning return code on Windows

This commit is contained in:
WerWolv
2025-12-21 20:53:07 +01:00
parent 018bedb2bd
commit 4e628826c3

View File

@@ -131,7 +131,12 @@ int launchExecutable() {
::CloseHandle(pi.hThread); ::CloseHandle(pi.hThread);
::CloseHandle(hChildStdoutRead); ::CloseHandle(hChildStdoutRead);
return EXIT_SUCCESS; DWORD exitCode = 0;
if (::GetExitCodeProcess(pi.hProcess, &exitCode)) {
return static_cast<int>(exitCode);
} else {
return EXIT_FAILURE;
}
} }
int main() { int main() {