mirror of
https://github.com/reactos/reactos.git
synced 2026-05-09 00:16:53 +08:00
As it appears, the process exit code of CMD /C is really the errorlevel, and not the "command's return value".
This commit is contained in:
@@ -1800,7 +1800,7 @@ Initialize(VOID)
|
||||
HMODULE NtDllModule;
|
||||
TCHAR commandline[CMDLINE_LENGTH];
|
||||
TCHAR ModuleName[_MAX_PATH + 1];
|
||||
INT nExitCode;
|
||||
// INT nExitCode;
|
||||
|
||||
HANDLE hIn, hOut;
|
||||
|
||||
@@ -1985,11 +1985,11 @@ Initialize(VOID)
|
||||
/* Do the /C or /K command */
|
||||
GetCmdLineCommand(commandline, &ptr[2], AlwaysStrip);
|
||||
bWaitForCommand = TRUE;
|
||||
nExitCode = ParseCommandLine(commandline);
|
||||
/* nExitCode = */ ParseCommandLine(commandline);
|
||||
bWaitForCommand = FALSE;
|
||||
if (option != _T('K'))
|
||||
{
|
||||
nErrorLevel = nExitCode;
|
||||
// nErrorLevel = nExitCode;
|
||||
bExit = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user