Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9e518dc7
Commit
9e518dc7
authored
Mar 04, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Fix stdio redirects.
parent
a97d1200
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
wcmdmain.c
programs/cmd/wcmdmain.c
+3
-5
No files found.
programs/cmd/wcmdmain.c
View file @
9e518dc7
...
...
@@ -47,7 +47,6 @@ const char version_string[] = "CMD Version " PACKAGE_VERSION "\n\n";
const
char
anykey
[]
=
"Press Return key to continue: "
;
char
quals
[
MAX_PATH
],
param1
[
MAX_PATH
],
param2
[
MAX_PATH
];
BATCH_CONTEXT
*
context
=
NULL
;
static
HANDLE
old_stdin
=
INVALID_HANDLE_VALUE
,
old_stdout
=
INVALID_HANDLE_VALUE
;
extern
struct
env_stack
*
pushd_directories
;
static
char
*
WCMD_expand_envvar
(
char
*
start
);
...
...
@@ -314,6 +313,8 @@ void WCMD_process_command (char *command)
char
*
whichcmd
;
SECURITY_ATTRIBUTES
sa
;
char
*
new_cmd
;
HANDLE
old_stdin
=
INVALID_HANDLE_VALUE
;
HANDLE
old_stdout
=
INVALID_HANDLE_VALUE
;
/* Move copy of the command onto the heap so it can be expanded */
new_cmd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAXSTRING
);
...
...
@@ -587,12 +588,10 @@ void WCMD_process_command (char *command)
if
(
old_stdin
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
GetStdHandle
(
STD_INPUT_HANDLE
));
SetStdHandle
(
STD_INPUT_HANDLE
,
old_stdin
);
old_stdin
=
INVALID_HANDLE_VALUE
;
}
if
(
old_stdout
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
GetStdHandle
(
STD_OUTPUT_HANDLE
));
SetStdHandle
(
STD_OUTPUT_HANDLE
,
old_stdout
);
old_stdout
=
INVALID_HANDLE_VALUE
;
}
}
...
...
@@ -606,8 +605,7 @@ static void init_msvcrt_io_block(STARTUPINFO* st)
GetStartupInfo
(
&
st_p
);
st
->
cbReserved2
=
st_p
.
cbReserved2
;
st
->
lpReserved2
=
st_p
.
lpReserved2
;
if
(
st_p
.
cbReserved2
&&
st_p
.
lpReserved2
&&
(
old_stdin
!=
INVALID_HANDLE_VALUE
||
old_stdout
!=
INVALID_HANDLE_VALUE
))
if
(
st_p
.
cbReserved2
&&
st_p
.
lpReserved2
)
{
/* Override the entries for fd 0,1,2 if we happened
* to change those std handles (this depends on the way wcmd sets
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment