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

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
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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

}