On 22.09.2020 08:26, Haidong Yu wrote:
if (console->is_unix){unsigned int h = 0;status = NtDeviceIoControlFile(console->server, NULL, NULL, NULL, &io, IOCTL_CONDRV_SETUP_INPUT,&h, sizeof(h), NULL, 0);if (status) ERR( "input restore failed: %#x\n", status );}CloseHandle( console->input_thread );console->input_thread = NULL;
We should probably also terminate current read, like we do in the end of the function. Please break out of the loop instead of duplicating that code.
Thanks,
Jacek