public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: Andrew Ng <anng.sw@gmail.com>
Subject: Re: Repeated input in PTY with SSH when a native process runs a Cygwin process that consumes input
Date: Mon, 1 Jun 2020 19:47:32 +0900	[thread overview]
Message-ID: <20200601194732.f1d0b3f1dbac9eb767d5084a@nifty.ne.jp> (raw)
In-Reply-To: <CADbiGS62rVmYtBc=R8g=DFZErP+aUFxzwdXS=XF8WL+1vv0N2Q@mail.gmail.com>

On Sun, 31 May 2020 13:00:51 +0100
Andrew Ng <anng.sw@gmail.com> wrote:
> > The developers snapshot, in which the issue has been fixed,
> > is ready. Could you please test?
> 
> Thanks for the fast response.
> 
> I have tested the snapshot and can confirm that it fixes the issue. I
> have also applied the same fix to MSYS2 and confirmed the issue is
> fixed there too.

Thanks for testing.

> I did take a look at the code when I came across this issue and I
> noticed a few things that looked a bit odd. I noticed that the
> following functions appear to make use of rabuf () without
> consideration for raixget ():
> 
>   fhandler_termios::eat_readahead
>   fhandler_pty_master::accept_input
>   fhandler_pty_master::transfer_input_to_pcon
> 
> Also fhandler_pty_slave::eat_readahead does 'eols' processing without
> any guard on is_line_input (), which seems to differ from the code
> pattern seen elsewhere.
> 
> I don't know if these are important, but thought I should mention
> them, just in case.

Thank you for your advice. I will check if these can cause any
problem.

As for pty master, get_readahead() is not used at all, so raixget()
is always 0. So pty master code does not cause problem.

However, it is certainly dangerous. I will consider how these
should be.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

      reply	other threads:[~2020-06-01 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 14:46 Andrew Ng
2020-05-30 16:06 ` Takashi Yano
2020-05-31  9:04   ` Takashi Yano
2020-05-31 12:00     ` Andrew Ng
2020-06-01 10:47       ` Takashi Yano [this message]

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=20200601194732.f1d0b3f1dbac9eb767d5084a@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=anng.sw@gmail.com \
    --cc=cygwin@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).