cmd.exe: EXIT /b skips any residual commands.

This commit is contained in:
Jason Edmeades 2007-06-15 20:59:24 +01:00 committed by Alexandre Julliard
parent de4c6970a3
commit d2474dece3
3 changed files with 4 additions and 3 deletions

View File

@ -2053,7 +2053,7 @@ int WCMD_volume (int mode, WCHAR *path) {
*
*/
void WCMD_exit (void) {
void WCMD_exit (CMD_LIST **cmdList) {
static const WCHAR parmB[] = {'/','B','\0'};
int rc = atoiW(param1); /* Note: atoi of empty parameter is 0 */
@ -2061,6 +2061,7 @@ void WCMD_exit (void) {
if (context && lstrcmpiW(quals, parmB) == 0) {
errorlevel = rc;
context -> skip_rest = TRUE;
*cmdList = NULL;
} else {
ExitProcess(rc);
}

View File

@ -50,7 +50,7 @@ void WCMD_directory (WCHAR *);
void WCMD_echo (const WCHAR *);
void WCMD_endlocal (void);
void WCMD_enter_paged_mode(const WCHAR *);
void WCMD_exit (void);
void WCMD_exit (CMD_LIST **cmdList);
void WCMD_for (WCHAR *, CMD_LIST **cmdList);
void WCMD_give_help (WCHAR *command);
void WCMD_goto (CMD_LIST **cmdList);

View File

@ -799,7 +799,7 @@ void WCMD_process_command (WCHAR *command, CMD_LIST **cmdList)
WCMD_more(p);
break;
case WCMD_EXIT:
WCMD_exit ();
WCMD_exit (cmdList);
break;
default:
WCMD_run_program (whichcmd, 0);