public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: pty: Disable pseudo console if TERM is dumb or not set.
Date: Sun, 30 Aug 2020 14:49:25 +0200	[thread overview]
Message-ID: <20200830124925.GQ3272@calimero.vinschen.de> (raw)
In-Reply-To: <20200829201228.b327d38eab10a64d941f99c0@nifty.ne.jp>

Hi Takashi,

On Aug 29 20:12, Takashi Yano via Cygwin-patches wrote:
> Hi Corinna,
> 
> On Sat, 29 Aug 2020 04:25:54 +0900
> Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.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,
> I think.
> 
> 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.

I like the idea in general, but isn't there a noticable perfomance hit?


Corinna

  parent reply	other threads:[~2020-08-30 12:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 12:00 Takashi Yano
2020-08-26 17:36 ` Corinna Vinschen
2020-08-27  4:07   ` Takashi Yano
2020-08-27  8:47     ` Corinna Vinschen
2020-08-27  8:59       ` Takashi Yano
2020-08-27  9:05         ` Corinna Vinschen
2020-08-28 13:45 ` Corinna Vinschen
2020-08-28 19:25   ` Takashi Yano
2020-08-29 11:12     ` Takashi Yano
2020-08-29 13:14       ` Takashi Yano
2020-08-29 20:25         ` Takashi Yano
2020-08-29 21:13           ` Takashi Yano
2020-08-30  7:42             ` Takashi Yano
2020-08-30  7:58               ` Takashi Yano
2020-08-30 12:49       ` Corinna Vinschen [this message]
2020-08-31  3:26         ` Takashi Yano
2020-08-31  8:16           ` Corinna Vinschen
2020-08-31  9:47             ` Takashi Yano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200830124925.GQ3272@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).