Skip to content

Commit

Permalink
Bug 735929 - [PATCH] Windows: Process exit code is ignored for proces…
Browse files Browse the repository at this point in the history
…ses launched using ShellExecuteEx()
  • Loading branch information
Dimitri van Heesch committed Sep 23, 2014
1 parent 7cd2b1f commit 68aa8c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,16 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
else if (sInfo.hProcess) /* executable was launched, wait for it to finish */
{
WaitForSingleObject(sInfo.hProcess,INFINITE);
/* get process exit code */
DWORD exitCode;
if (!GetExitCodeProcess(sInfo.hProcess,&exitCode))
{
exitCode = -1;
}
CloseHandle(sInfo.hProcess);
return exitCode;
}
}
return 0;
#endif

}
Expand Down

0 comments on commit 68aa8c2

Please sign in to comment.