https://git.reactos.org/?p=reactos.git;a=commitdiff;h=895dccd4ac7cc9c8dcb4a679e34fe0b50c560b2e
commit 895dccd4ac7cc9c8dcb4a679e34fe0b50c560b2e Author: Hermès Bélusca-Maïto <[email protected]> AuthorDate: Sun Sep 27 20:24:38 2020 +0200 Commit: Hermès Bélusca-Maïto <[email protected]> CommitDate: Sun Sep 27 20:26:36 2020 +0200 [CMD] Cleanup all batch contexts if the execution loop stopped due to EXIT. --- base/shell/cmd/batch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/shell/cmd/batch.c b/base/shell/cmd/batch.c index 671be4189d9..36600cd0720 100644 --- a/base/shell/cmd/batch.c +++ b/base/shell/cmd/batch.c @@ -478,6 +478,11 @@ INT Batch(LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd) ret = ExecuteCommandWithEcho(Cmd); FreeCommand(Cmd); } + if (bExit) + { + /* Stop all execution */ + ExitAllBatches(); + } /* Perform top-level batch cleanup */ if (!bc || bTopLevel)
