Module: wine Branch: master Commit: 09969e8de1d970ef923a0e6d19f191850b13fdae URL: http://source.winehq.org/git/wine.git/?a=commit;h=09969e8de1d970ef923a0e6d19...
Author: Jason Edmeades jason.edmeades@googlemail.com Date: Thu Aug 9 23:56:15 2007 +0100
cmd.exe: Wait when launching GUI pgms in batch.
---
programs/cmd/wcmdmain.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 708686c..775a553 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1090,7 +1090,8 @@ void WCMD_run_program (WCHAR *command, int called) { if (!assumeInternal && !console) errorlevel = 0; 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); if (errorlevel == STILL_ACTIVE) errorlevel = 0; }