diff --git a/bin/win/runnerw.exe b/bin/win/runnerw.exe index 9df94ac5b919..16bc0c9069ba 100644 Binary files a/bin/win/runnerw.exe and b/bin/win/runnerw.exe differ diff --git a/native/runner/runnerw/runnerw.cpp b/native/runner/runnerw/runnerw.cpp index ed4954d43d80..0e9fe3a9b47a 100644 --- a/native/runner/runnerw/runnerw.cpp +++ b/native/runner/runnerw/runnerw.cpp @@ -294,10 +294,12 @@ int main(int argc, char * argv[]) { NULL, &si, &pi)) { + DWORD exitCode = GetLastError(); + if (exitCode == 0) exitCode = 1; ErrorMessage("CreateProcess"); CloseHandle(newstdin); CloseHandle(write_stdin); - exit(2); + exit(exitCode); } if (hasConsoleWindow || childParams.createNewConsole) { attachChildConsole(pi); @@ -308,7 +310,7 @@ int main(int argc, char * argv[]) { CreateThread(NULL, 0, &scanStdinThread, &write_stdin, 0, NULL); - unsigned long exitCode = 0; + DWORD exitCode = 0; while (true) { int rc = WaitForSingleObject(pi.hProcess, INFINITE);