conhost: Input should be restored and input_thread handle should be closed before return.

Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Haidong Yu 2020-09-23 09:31:43 +08:00 committed by Alexandre Julliard
parent d4b162509f
commit d22e821964
1 changed files with 2 additions and 1 deletions

View File

@ -1652,7 +1652,7 @@ static DWORD WINAPI tty_input( void *param )
{
case 3: /* end of text */
LeaveCriticalSection( &console_section );
return 0;
goto done;
case '\n':
key_press( console, '\n', VK_RETURN, LEFT_CTRL_PRESSED );
break;
@ -1681,6 +1681,7 @@ static DWORD WINAPI tty_input( void *param )
TRACE( "NtReadFile failed: %#x\n", status );
done:
EnterCriticalSection( &console_section );
if (console->read_ioctl) read_complete( console, status, NULL, 0, FALSE );
if (console->is_unix)