Skip to content

Commit 68ad673

Browse files
authored
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.
1 parent cc708b2 commit 68ad673

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/win32/win32compat/termio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ syncio_close(struct w32_io* pio)
266266
WaitForSingleObject(pio->write_overlapped.hEvent, INFINITE);
267267
/* drain queued APCs */
268268
SleepEx(0, TRUE);
269-
CloseHandle(WINHANDLE(pio));
269+
/* TODO - fix this, closing Console handles is interfering with TTY/PTY rendering */
270+
if (FILETYPE(pio) != FILE_TYPE_CHAR)
271+
CloseHandle(WINHANDLE(pio));
270272
if (pio->read_details.buf)
271273
free(pio->read_details.buf);
272274
if (pio->write_details.buf)

0 commit comments

Comments
 (0)