Commit 63e8a260 authored by Jaco Greeff's avatar Jaco Greeff Committed by Alexandre Julliard

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

using the current allocated STDIN and STDOUT handles for command input/output.
parent 3c9d9182
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment