Skip the allocation of a new console on "wcmd /c <command>" execution,

using the current allocated STDIN and STDOUT handles for command
input/output.
This commit is contained in:
Jaco Greeff 2002-11-04 22:36:07 +00:00 committed by Alexandre Julliard
parent 3c9d9182eb
commit 63e8a260eb

View File

@ -67,6 +67,16 @@ HANDLE h;
}
}
/* If we do a "wcmd /c command", we don't want to allocate a new
* console since the command returns immediately. Rather, we use
* the surrently allocated input and output handles. This allows
* us to pipe to and read from the command interpreter.
*/
if (strstr(args, "/c") != NULL) {
WCMD_process_command (param);
return 0;
}
/*
* Allocate a console and set it up.
*/
@ -87,11 +97,6 @@ HANDLE h;
WCMD_echo ("OFF");
}
if (strstr(args, "/c") != NULL) {
WCMD_process_command (param);
return 0;
}
if (strstr(args, "/k") != NULL) {
WCMD_process_command (param);
}