X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC8C4386F806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1591008475; bh=SOqQ8LXqeQRfV5iV4mmWNmW97bdSBYSI8Sx6KhCpvP0=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CJ/rN+rQShMvhDTMqx3EKu9GWGUelRoyz6rXSBKDG0A60yCpiFFov2sIIeSsQXgxU lJ5f6tJXAcxBZhzbW+TYZFXWkN9eQJIJtH5Ewn7fNj1gxnpSFoaj5RfVJ6JgFCrKvD +bGMWRY8xq6wuC3NiVg87fyx4+mps4hxMQk+IF5U= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 09DA33851C0C DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 051AlE62003431 X-Nifty-SrcIP: [124.155.38.192] Date: Mon, 1 Jun 2020 19:47:32 +0900 To: cygwin AT cygwin DOT com Subject: Re: Repeated input in PTY with SSH when a native process runs a Cygwin process that consumes input Message-Id: <20200601194732.f1d0b3f1dbac9eb767d5084a@nifty.ne.jp> In-Reply-To: References: <20200531010628 DOT da3864bdc895a02b768bb694 AT nifty DOT ne DOT jp> <20200531180439 DOT 3f6a13db1ffa6ed1df39959a AT nifty DOT ne DOT jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Cc: Andrew Ng Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" On Sun, 31 May 2020 13:00:51 +0100 Andrew Ng 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple