Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
ca95afd3
Commit
ca95afd3
authored
Sep 16, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use console connection object in AttachConsole.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6565b08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
console.c
dlls/kernelbase/console.c
+10
-11
No files found.
dlls/kernelbase/console.c
View file @
ca95afd3
...
...
@@ -293,24 +293,23 @@ BOOL WINAPI DECLSPEC_HOTPATCH AttachConsole( DWORD pid )
RtlEnterCriticalSection
(
&
console_section
);
SERVER_START_REQ
(
attach_console
)
if
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
)
{
req
->
pid
=
pid
;
ret
=
!
wine_server_call_err
(
req
);
RtlLeaveCriticalSection
(
&
console_section
);
WARN
(
"console already attached
\n
"
);
SetLastError
(
ERROR_ACCESS_DENIED
);
return
FALSE
;
}
SERVER_END_REQ
;
ret
=
create_console_connection
(
NULL
)
&&
console_ioctl
(
console_connection
,
IOCTL_CONDRV_BIND_PID
,
&
pid
,
sizeof
(
pid
),
NULL
,
0
,
NULL
);
if
(
ret
)
{
if
((
ret
=
init_console_std_handles
()))
{
HANDLE
console
=
CreateFileW
(
L"CONIN$"
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
console
!=
INVALID_HANDLE_VALUE
)
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
=
console
;
else
ret
=
FALSE
;
}
if
(
!
ret
)
FreeConsole
();
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
=
create_console_reference
(
console_connection
);
ret
=
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
&&
init_console_std_handles
();
}
if
(
!
ret
)
FreeConsole
();
RtlLeaveCriticalSection
(
&
console_section
);
return
ret
;
}
...
...
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