diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-09-23 18:39:30 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-09-23 18:39:30 (GMT) |
commit | 68aa8c2bd8a5e6a8ad7c46c725c8bb5e61896ba0 (patch) | |
tree | 40abc18e8dcf77f47032458d8629c3c666fcffb3 /src | |
parent | 7cd2b1f27a03846a8f9bcd1e4489cbfebf56bfa2 (diff) | |
download | Doxygen-68aa8c2bd8a5e6a8ad7c46c725c8bb5e61896ba0.zip Doxygen-68aa8c2bd8a5e6a8ad7c46c725c8bb5e61896ba0.tar.gz Doxygen-68aa8c2bd8a5e6a8ad7c46c725c8bb5e61896ba0.tar.bz2 |
Bug 735929 - [PATCH] Windows: Process exit code is ignored for processes launched using ShellExecuteEx()
Diffstat (limited to 'src')
-rw-r--r-- | src/portable.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/portable.cpp b/src/portable.cpp index 258c50f..7f6be6e 100644 --- a/src/portable.cpp +++ b/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 } |