[CMD] Wait for commands to exit when run with /C or /K. CORE-12402 #resolve