[CMD] Wait for the spawned application to exit while executing a batch script. Patch by Joachim Henze. CORE-12402

svn path=/trunk/; revision=73246
This commit is contained in:
Mark Jansen 2016-11-17 20:47:23 +00:00
parent 20421c1d49
commit 9beec30ba3

View file

@ -442,8 +442,9 @@ Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
if (prci.hProcess != NULL)
{
if (IsConsoleProcess(prci.hProcess))
if (bc != NULL || IsConsoleProcess(prci.hProcess))
{
/* when processing a batch file or starting console processes: execute synchronously */
EnterCriticalSection(&ChildProcessRunningLock);
dwChildProcessId = prci.dwProcessId;