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
09ff2436
Commit
09ff2436
authored
Aug 13, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass console handle to the child process.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
06c3e7e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
console.c
dlls/kernel32/tests/console.c
+0
-1
console.c
server/console.c
+6
-2
process.c
server/process.c
+2
-1
process.h
server/process.h
+2
-2
No files found.
dlls/kernel32/tests/console.c
View file @
09ff2436
...
...
@@ -3724,7 +3724,6 @@ static void test_AttachConsole_child(DWORD console_pid)
ok
(
!
res
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"AttachConsole returned: %x(%u)
\n
"
,
res
,
GetLastError
());
todo_wine
ok
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
!=
NULL
,
"ConsoleHandle is NULL
\n
"
);
res
=
FreeConsole
();
ok
(
res
,
"FreeConsole failed: %u
\n
"
,
GetLastError
());
...
...
server/console.c
View file @
09ff2436
...
...
@@ -620,8 +620,8 @@ int free_console( struct process *process )
* 2/ parent is a renderer which launches process, and process should attach to the console
* rendered by parent
*/
void
inherit_console
(
struct
thread
*
parent_thread
,
struct
process
*
parent
,
struct
process
*
process
,
obj_handle_t
hconin
)
obj_handle_t
inherit_console
(
struct
thread
*
parent_thread
,
struct
process
*
parent
,
struct
process
*
process
,
obj_handle_t
hconin
)
{
int
done
=
0
;
...
...
@@ -652,6 +652,10 @@ void inherit_console( struct thread *parent_thread, struct process *parent, stru
process
->
console
=
(
struct
console_input
*
)
grab_object
(
parent
->
console
);
process
->
console
->
num_proc
++
;
}
if
(
!
process
->
console
)
return
0
;
return
alloc_handle
(
process
,
process
->
console
,
SYNCHRONIZE
|
FILE_READ_ATTRIBUTES
|
FILE_WRITE_ATTRIBUTES
,
0
);
}
struct
thread
*
console_get_renderer
(
struct
console_input
*
console
)
...
...
server/process.c
View file @
09ff2436
...
...
@@ -1224,7 +1224,8 @@ DECL_HANDLER(new_process)
* like if hConOut and hConIn are console handles, then they should be on the same
* physical console
*/
inherit_console
(
parent_thread
,
parent
,
process
,
req
->
inherit_all
?
info
->
data
->
hstdin
:
0
);
info
->
data
->
console
=
inherit_console
(
parent_thread
,
parent
,
process
,
req
->
inherit_all
?
info
->
data
->
hstdin
:
0
);
}
if
(
!
req
->
inherit_all
&&
!
(
req
->
create_flags
&
CREATE_NEW_CONSOLE
))
...
...
server/process.h
View file @
09ff2436
...
...
@@ -131,8 +131,8 @@ extern void detach_debugged_processes( struct thread *debugger );
extern
void
enum_processes
(
int
(
*
cb
)(
struct
process
*
,
void
*
),
void
*
user
);
/* console functions */
extern
void
inherit_console
(
struct
thread
*
parent_thread
,
struct
process
*
parent
,
struct
process
*
process
,
obj_handle_t
hconin
);
extern
obj_handle_t
inherit_console
(
struct
thread
*
parent_thread
,
struct
process
*
parent
,
struct
process
*
process
,
obj_handle_t
hconin
);
extern
int
free_console
(
struct
process
*
process
);
extern
struct
thread
*
console_get_renderer
(
struct
console_input
*
console
);
...
...
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