Permalink
Browse files

Bug 735929 - [PATCH] Windows: Process exit code is ignored for proces…

…ses launched using ShellExecuteEx()
  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Sep 23, 2014
1 parent 7cd2b1f commit 68aa8c2bd8a5e6a8ad7c46c725c8bb5e61896ba0
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/portable.cpp
@@ -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
}

0 comments on commit 68aa8c2

Please sign in to comment.