cmd.exe: Wait when launching GUI pgms in batch.
This commit is contained in:
parent
c8b6b2b1d8
commit
09969e8de1
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user