From 9beec30ba3b1d8ac1964c899f01041325f43a534 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Thu, 17 Nov 2016 20:47:23 +0000 Subject: [PATCH] [CMD] Wait for the spawned application to exit while executing a batch script. Patch by Joachim Henze. CORE-12402 svn path=/trunk/; revision=73246 --- reactos/base/shell/cmd/cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/base/shell/cmd/cmd.c b/reactos/base/shell/cmd/cmd.c index 3c5914c6198..b6e09e3a422 100644 --- a/reactos/base/shell/cmd/cmd.c +++ b/reactos/base/shell/cmd/cmd.c @@ -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; -- 2.17.1