kernel32: Use PEB console handle in CONSOLE_HandleCtrlC to check console connection.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ac94d88905
commit
0451e44d95
|
@ -659,9 +659,7 @@ LONG CALLBACK CONSOLE_HandleCtrlC( EXCEPTION_POINTERS *eptr )
|
|||
HANDLE thread;
|
||||
|
||||
if (eptr->ExceptionRecord->ExceptionCode != CONTROL_C_EXIT) return EXCEPTION_CONTINUE_SEARCH;
|
||||
|
||||
/* FIXME: better test whether a console is attached to this process ??? */
|
||||
if (CONSOLE_GetNumHistoryEntries() == (unsigned)-1) return EXCEPTION_CONTINUE_SEARCH;
|
||||
if (!RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle) return EXCEPTION_CONTINUE_SEARCH;
|
||||
|
||||
/* check if we have to ignore ctrl-C events */
|
||||
if (!(NtCurrentTeb()->Peb->ProcessParameters->ConsoleFlags & 1))
|
||||
|
|
Loading…
Reference in New Issue