mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Patch #101032, from David Bolen:
Ensure the "proxied" command's return code bubbles back up.
This commit is contained in:
@@ -27,6 +27,7 @@ int main(int argc, char *argv[])
|
||||
BOOL bRet;
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
DWORD exit_code=0;
|
||||
|
||||
if (argc != 2) {
|
||||
MessageBox(NULL, usage, argv[0], MB_OK);
|
||||
@@ -50,10 +51,12 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
if (bRet) {
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
if (WaitForSingleObject(pi.hProcess, INFINITE) != WAIT_FAILED) {
|
||||
GetExitCodeProcess(pi.hProcess, &exit_code);
|
||||
}
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
return 0;
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user