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
626b2f18
Commit
626b2f18
authored
Nov 15, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Preserve handle flags when inheriting a std handle.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
1c7e1f1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
process.c
dlls/kernel32/tests/process.c
+2
-2
process.c
server/process.c
+3
-3
No files found.
dlls/kernel32/tests/process.c
View file @
626b2f18
...
...
@@ -3319,11 +3319,11 @@ static void test_StdHandleInheritance(void)
/* all others handles type behave as H_DISK */
{
ARG_STARTUPINFO
|
H_DISK
,
HATTR_NULL
,
.
is_broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
/* 5*/
{
ARG_STD
|
H_DISK
,
HATTR_TYPE
|
FILE_TYPE_DISK
,
.
is_todo
=
1
},
/* 5*/
{
ARG_STD
|
H_DISK
,
HATTR_TYPE
|
FILE_TYPE_DISK
},
/* all others handles type behave as H_DISK */
{
ARG_STARTUPINFO
|
ARG_HANDLE_PROTECT
|
H_DISK
,
HATTR_NULL
,
.
is_broken
=
HATTR_TYPE
|
FILE_TYPE_UNKNOWN
},
{
ARG_STD
|
ARG_HANDLE_PROTECT
|
H_DISK
,
HATTR_TYPE
|
HATTR_PROTECT
|
FILE_TYPE_DISK
,
.
is_todo
=
1
},
{
ARG_STD
|
ARG_HANDLE_PROTECT
|
H_DISK
,
HATTR_TYPE
|
HATTR_PROTECT
|
FILE_TYPE_DISK
},
},
nothing_gui
[]
=
{
...
...
server/process.c
View file @
626b2f18
...
...
@@ -1336,11 +1336,11 @@ DECL_HANDLER(new_process)
if
(
!
(
req
->
flags
&
PROCESS_CREATE_FLAGS_INHERIT_HANDLES
)
&&
info
->
data
->
console
!=
1
)
{
info
->
data
->
hstdin
=
duplicate_handle
(
parent
,
info
->
data
->
hstdin
,
process
,
0
,
OBJ_INHERIT
,
DUPLICATE_SAME_ACCES
S
);
0
,
0
,
DUPLICATE_SAME_ACCESS
|
DUPLICATE_SAME_ATTRIBUTE
S
);
info
->
data
->
hstdout
=
duplicate_handle
(
parent
,
info
->
data
->
hstdout
,
process
,
0
,
OBJ_INHERIT
,
DUPLICATE_SAME_ACCES
S
);
0
,
0
,
DUPLICATE_SAME_ACCESS
|
DUPLICATE_SAME_ATTRIBUTE
S
);
info
->
data
->
hstderr
=
duplicate_handle
(
parent
,
info
->
data
->
hstderr
,
process
,
0
,
OBJ_INHERIT
,
DUPLICATE_SAME_ACCES
S
);
0
,
0
,
DUPLICATE_SAME_ACCESS
|
DUPLICATE_SAME_ATTRIBUTE
S
);
/* some handles above may have been invalid; this is not an error */
if
(
get_error
()
==
STATUS_INVALID_HANDLE
||
get_error
()
==
STATUS_OBJECT_TYPE_MISMATCH
)
clear_error
();
...
...
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