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
ed835839
Commit
ed835839
authored
Jul 30, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use init_console_std_handles in AttachConsole.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a09a268f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
41 deletions
+5
-41
console.c
dlls/kernelbase/console.c
+3
-6
server_protocol.h
include/wine/server_protocol.h
+1
-5
console.c
server/console.c
+0
-14
protocol.def
server/protocol.def
+0
-4
request.h
server/request.h
+0
-4
trace.c
server/trace.c
+1
-8
No files found.
dlls/kernelbase/console.c
View file @
ed835839
...
...
@@ -246,15 +246,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH AttachConsole( DWORD pid )
SERVER_START_REQ
(
attach_console
)
{
req
->
pid
=
pid
;
if
((
ret
=
!
wine_server_call_err
(
req
)))
{
SetStdHandle
(
STD_INPUT_HANDLE
,
wine_server_ptr_handle
(
reply
->
std_in
));
SetStdHandle
(
STD_OUTPUT_HANDLE
,
wine_server_ptr_handle
(
reply
->
std_out
));
SetStdHandle
(
STD_ERROR_HANDLE
,
wine_server_ptr_handle
(
reply
->
std_err
));
}
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
if
(
ret
&&
!
(
ret
=
init_console_std_handles
()))
FreeConsole
();
RtlLeaveCriticalSection
(
&
console_section
);
return
ret
;
}
...
...
include/wine/server_protocol.h
View file @
ed835839
...
...
@@ -1858,10 +1858,6 @@ struct attach_console_request
struct
attach_console_reply
{
struct
reply_header
__header
;
obj_handle_t
std_in
;
obj_handle_t
std_out
;
obj_handle_t
std_err
;
char
__pad_20
[
4
];
};
...
...
@@ -6355,7 +6351,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 63
3
#define SERVER_PROTOCOL_VERSION 63
4
/* ### protocol_version end ### */
...
...
server/console.c
View file @
ed835839
...
...
@@ -2108,15 +2108,6 @@ DECL_HANDLER(attach_console)
if
(
process
->
console
&&
process
->
console
->
active
)
{
reply
->
std_in
=
alloc_handle
(
current
->
process
,
process
->
console
,
GENERIC_READ
,
0
);
if
(
!
reply
->
std_in
)
goto
error
;
reply
->
std_out
=
alloc_handle
(
current
->
process
,
process
->
console
->
active
,
GENERIC_WRITE
,
0
);
if
(
!
reply
->
std_out
)
goto
error
;
reply
->
std_err
=
alloc_handle
(
current
->
process
,
process
->
console
->
active
,
GENERIC_WRITE
,
0
);
if
(
!
reply
->
std_err
)
goto
error
;
current
->
process
->
console
=
(
struct
console_input
*
)
grab_object
(
process
->
console
);
current
->
process
->
console
->
num_proc
++
;
}
...
...
@@ -2127,11 +2118,6 @@ DECL_HANDLER(attach_console)
release_object
(
process
);
return
;
error
:
if
(
reply
->
std_in
)
close_handle
(
current
->
process
,
reply
->
std_in
);
if
(
reply
->
std_out
)
close_handle
(
current
->
process
,
reply
->
std_out
);
release_object
(
process
);
}
/* set info about a console input */
...
...
server/protocol.def
View file @
ed835839
...
...
@@ -1475,10 +1475,6 @@ enum server_fd_type
/* Attach to a other process's console */
@REQ(attach_console)
process_id_t pid; /* pid of attached console process */
@REPLY
obj_handle_t std_in; /* attached stdin */
obj_handle_t std_out; /* attached stdout */
obj_handle_t std_err; /* attached stderr */
@END
...
...
server/request.h
View file @
ed835839
...
...
@@ -1112,10 +1112,6 @@ C_ASSERT( sizeof(struct alloc_console_reply) == 16 );
C_ASSERT
(
sizeof
(
struct
free_console_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
attach_console_request
,
pid
)
==
12
);
C_ASSERT
(
sizeof
(
struct
attach_console_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
attach_console_reply
,
std_in
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
attach_console_reply
,
std_out
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
attach_console_reply
,
std_err
)
==
16
);
C_ASSERT
(
sizeof
(
struct
attach_console_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_wait_event_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_console_wait_event_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_wait_event_reply
,
event
)
==
8
);
...
...
server/trace.c
View file @
ed835839
...
...
@@ -2046,13 +2046,6 @@ static void dump_attach_console_request( const struct attach_console_request *re
fprintf
(
stderr
,
" pid=%04x"
,
req
->
pid
);
}
static
void
dump_attach_console_reply
(
const
struct
attach_console_reply
*
req
)
{
fprintf
(
stderr
,
" std_in=%04x"
,
req
->
std_in
);
fprintf
(
stderr
,
", std_out=%04x"
,
req
->
std_out
);
fprintf
(
stderr
,
", std_err=%04x"
,
req
->
std_err
);
}
static
void
dump_get_console_wait_event_request
(
const
struct
get_console_wait_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -4793,7 +4786,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL
,
(
dump_func
)
dump_alloc_console_reply
,
NULL
,
(
dump_func
)
dump_attach_console_reply
,
NULL
,
(
dump_func
)
dump_get_console_wait_event_reply
,
NULL
,
(
dump_func
)
dump_get_console_input_info_reply
,
...
...
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