Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
233074de
Commit
233074de
authored
Nov 15, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't reset invalid std handle in init.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
35bea756
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
process.c
dlls/kernel32/tests/process.c
+4
-4
file.c
dlls/msvcrt/file.c
+7
-5
file.c
dlls/msvcrt/tests/file.c
+0
-1
No files found.
dlls/kernel32/tests/process.c
View file @
233074de
...
...
@@ -3341,8 +3341,8 @@ static void test_StdHandleInheritance(void)
{
ARG_STD
|
ARG_HANDLE_PROTECT
|
H_DISK
,
HATTR_TYPE
|
HATTR_PROTECT
|
FILE_TYPE_DISK
},
/* all others handles type behave as H_DISK */
{
ARG_STARTUPINFO
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
,
.
is_
todo
=
24
,
.
is_
broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
{
ARG_STD
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
,
.
is_todo
=
16
},
{
ARG_STARTUPINFO
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
,
.
is_broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
{
ARG_STD
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
},
/* all others handles type behave as H_DISK */
/*10*/
{
ARG_STARTUPINFO
|
H_DEVIL
,
HATTR_NULL
,
.
is_broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
...
...
@@ -3369,8 +3369,8 @@ static void test_StdHandleInheritance(void)
{
ARG_STD
|
ARG_HANDLE_INHERIT
|
H_DISK
,
HATTR_NULL
},
/* all others handles type behave as H_DISK */
/*10*/
{
ARG_STARTUPINFO
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
,
.
is_todo
=
24
},
{
ARG_STD
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
,
.
is_todo
=
16
},
/*10*/
{
ARG_STARTUPINFO
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
},
{
ARG_STD
|
ARG_CP_INHERIT
|
H_DISK
,
HATTR_DANGLING
},
/* all others handles type behave as H_DISK */
{
ARG_STARTUPINFO
|
H_DISK
,
HATTR_NULL
,
.
is_broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
...
...
dlls/msvcrt/file.c
View file @
233074de
...
...
@@ -560,12 +560,14 @@ static void msvcrt_set_fd(ioinfo *fdinfo, HANDLE hand, int flag)
ioinfo_set_unicode
(
fdinfo
,
FALSE
);
ioinfo_set_textmode
(
fdinfo
,
TEXTMODE_ANSI
);
if
(
hand
==
MSVCRT_NO_CONSOLE
)
hand
=
0
;
switch
(
fdinfo
-
MSVCRT___pioinfo
[
0
])
if
(
hand
!=
MSVCRT_NO_CONSOLE
)
{
case
0
:
SetStdHandle
(
STD_INPUT_HANDLE
,
hand
);
break
;
case
1
:
SetStdHandle
(
STD_OUTPUT_HANDLE
,
hand
);
break
;
case
2
:
SetStdHandle
(
STD_ERROR_HANDLE
,
hand
);
break
;
switch
(
fdinfo
-
MSVCRT___pioinfo
[
0
])
{
case
0
:
SetStdHandle
(
STD_INPUT_HANDLE
,
hand
);
break
;
case
1
:
SetStdHandle
(
STD_OUTPUT_HANDLE
,
hand
);
break
;
case
2
:
SetStdHandle
(
STD_ERROR_HANDLE
,
hand
);
break
;
}
}
}
...
...
dlls/msvcrt/tests/file.c
View file @
233074de
...
...
@@ -1897,7 +1897,6 @@ static void test_invalid_stdin_child( void )
ok
(
handle
==
(
HANDLE
)
-
2
,
"handle = %p
\n
"
,
handle
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
handle
=
GetStdHandle
(
STD_INPUT_HANDLE
);
todo_wine
ok
((
LONG_PTR
)
handle
>
0
,
"Expecting passed handle to be untouched
\n
"
);
info
=
&
__pioinfo
[
STDIN_FILENO
/
MSVCRT_FD_BLOCK_SIZE
][
STDIN_FILENO
%
MSVCRT_FD_BLOCK_SIZE
];
...
...
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