Commit 09969e8d authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd.exe: Wait when launching GUI pgms in batch.

parent c8b6b2b1
...@@ -1090,7 +1090,8 @@ void WCMD_run_program (WCHAR *command, int called) { ...@@ -1090,7 +1090,8 @@ void WCMD_run_program (WCHAR *command, int called) {
if (!assumeInternal && !console) errorlevel = 0; if (!assumeInternal && !console) errorlevel = 0;
else else
{ {
if (assumeInternal || !HIWORD(console)) WaitForSingleObject (pe.hProcess, INFINITE); /* Always wait when called in a batch program context */
if (assumeInternal || context || !HIWORD(console)) WaitForSingleObject (pe.hProcess, INFINITE);
GetExitCodeProcess (pe.hProcess, &errorlevel); GetExitCodeProcess (pe.hProcess, &errorlevel);
if (errorlevel == STILL_ACTIVE) errorlevel = 0; if (errorlevel == STILL_ACTIVE) errorlevel = 0;
} }
......
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