Commit 68aa8c2b authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 735929 - [PATCH] Windows: Process exit code is ignored for processes...

Bug 735929 - [PATCH] Windows: Process exit code is ignored for processes launched using ShellExecuteEx()
parent 7cd2b1f2
...@@ -169,10 +169,16 @@ int portable_system(const char *command,const char *args,bool commandHasConsole) ...@@ -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 */ else if (sInfo.hProcess) /* executable was launched, wait for it to finish */
{ {
WaitForSingleObject(sInfo.hProcess,INFINITE); WaitForSingleObject(sInfo.hProcess,INFINITE);
/* get process exit code */
DWORD exitCode;
if (!GetExitCodeProcess(sInfo.hProcess,&exitCode))
{
exitCode = -1;
}
CloseHandle(sInfo.hProcess); CloseHandle(sInfo.hProcess);
return exitCode;
} }
} }
return 0;
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment