Workaround for PTY regressions

Changes from #353 enabled closing of previously duplicated Console handles - this is causing TTY rendering issues in ssh.exe.
Added a workaround for now to skip closing Console handles.
This commit is contained in:
Manoj Ampalam 2019-01-11 12:19:39 -08:00 committed by GitHub
parent cc708b2b7c
commit 68ad673db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,7 +266,9 @@ syncio_close(struct w32_io* pio)
WaitForSingleObject(pio->write_overlapped.hEvent, INFINITE);
/* drain queued APCs */
SleepEx(0, TRUE);
CloseHandle(WINHANDLE(pio));
/* TODO - fix this, closing Console handles is interfering with TTY/PTY rendering */
if (FILETYPE(pio) != FILE_TYPE_CHAR)
CloseHandle(WINHANDLE(pio));
if (pio->read_details.buf)
free(pio->read_details.buf);
if (pio->write_details.buf)