Skip to content

Commit

Permalink
Workaround for PTY regressions
Browse files Browse the repository at this point in the history
Changes from PowerShell#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.
  • Loading branch information
manojampalam authored Jan 11, 2019
1 parent cc708b2 commit 68ad673
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/win32/win32compat/termio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 68ad673

Please sign in to comment.