[PATCH] Cygwin: pty: Disable pseudo console if TERM is dumb or not set.
Sat Aug 29 11:12:28 GMT 2020
On Sat, 29 Aug 2020 04:25:54 +0900
Takashi Yano via Cygwin-patches <email@example.com> wrote:
> Hi Corinna,
> On Fri, 28 Aug 2020 15:45:03 +0200
> Corinna Vinschen wrote:
> > Hi Takashi,
> > On Aug 26 21:00, Takashi Yano via Cygwin-patches wrote:
> > > Pseudo console generates escape sequences on execution of non-cygwin
> > > apps. If the terminal does not support escape sequence, output will
> > > be garbled. This patch prevents garbled output in dumb terminal by
> > > disabling pseudo console.
> > Would you mind to encapsulate the TERM checks into a fhandler_pty_slave
> > method so the TERM specific stuff is done in the fhandler code, not
> > in spawn.cc?
> Thansk for the suggestion. I will submit v2 patch.
What do you think of v3 patch attached? With this patch,
terminal capability is checked by looking into terminfo
database rather than just checking terminal name. This
solution is more essential for the issue to be solved,
One downside of this solution, I noticed, is that tmux
sets TERM to "screen", which does not have CSI6n, by
default. As a result, pseudo console is disbled in tmux
by default. Setting TERM, such as screen.xterm-256color,
will solve the issue.
Takashi Yano <firstname.lastname@example.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7494 bytes
Desc: not available
More information about the Cygwin-patches