From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41850 invoked by alias); 6 Jun 2016 13:16:58 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 40718 invoked by uid 89); 6 Jun 2016 13:16:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-96.3 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=cygwin-patches, cygwinpatches, sleep X-HELO: calimero.vinschen.de Received: from ipbcc0227e.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.34.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jun 2016 13:16:44 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 6DDC3A803D5; Mon, 6 Jun 2016 15:16:42 +0200 (CEST) Date: Mon, 06 Jun 2016 13:16:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: gdb pty problem [Was: emacs gud-interface is not updated after gdb command execution (maybe because of incomplete output from gdb)] Message-ID: <20160606131642.GA4919@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <466943424.37628.394d161a-7219-415d-a659-0f774811ad2d.open-xchange@email.1und1.de> <44459aa0-4381-2368-ab63-5dffc26f3344@cornell.edu> <20160531094115.GE24015@calimero.vinschen.de> <34c9cf10-4930-a017-92fc-fd56171671b1@cornell.edu> <20160601141820.GF11431@calimero.vinschen.de> <20160606191231.a60b226a9867c15023e07fb1@nifty.ne.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline In-Reply-To: <20160606191231.a60b226a9867c15023e07fb1@nifty.ne.jp> User-Agent: Mutt/1.6.1 (2016-04-27) X-SW-Source: 2016-06/txt/msg00060.txt.bz2 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1328 On Jun 6 19:12, Takashi Yano wrote: > Hi Corinna, >=20 > I had looked into this problem, and found the cause. >=20 > 'man termios' says: > "A read(2) returns at most one line of input" in canonical mode. >=20 > On cygwin 2.5.1, read(2) returns all data in buffer if the buffer > size specified is large enough. This behaviour is correct in > noncanonical mode, but is not correct in canonical mode. >=20 > So, I would like to propose a following patch. > [...] > While checking this problem, I found a bug of tcflush(). > tcflush() flushes only partial data in the buffer. >=20 > The patch above also fixes this bug. >=20 > A test case attached (pty_readlen.c) is for confirming > the behaviour of read() and tcflush().=20 > [...] > Of course, Ken's gdbstc works fine without sleep with this patch, > as well as original emacs case. Thanks a lot. Patch applied. I uploaded a new snapshot with this patch to https://cygwin.com/snapshots/ for quick testing. Just one question: In future, would you mind terribly to provide patches in `git format-patch' format (and ideally on the cygwin-patches mailing list)? It's easier to handle by lazy maintainers... :) Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXVXe6AAoJEPU2Bp2uRE+gln8P/1ne4+ui8C7Nui/qsX3icgq3 XvrGyRqQAQTn1JgWPKfsI9wUGAosxYkk3UiInuSilVjZygrYFJUE3XUpM7dX1Cyf rGqal0f15Bpg+lN582A1SVGpcmMoSSrvwAWZ/OCXwRJOiWleOif+F9QoQlfPfTAp 02SEW47ca/5DKCHJOPe+bWwL4ZEQFtv+cGHhoU/29OdazJRtsJjBsQtYfgTc86NN ttREhhPbnsDAC+kYSCFCEMAwPZNIDicVGTxxKKNiqQ6uLwsKaw9ZmFlcSPgaEx2Z RFDbrbHLIDhRdFdrg7KX7dDpJWF4EYaRmDVNbGKGnflbFKasfmtb+FthUvvgBheX 61OxTa3MSUGKZZxk4mg5MRNXKt8Plg4U5zGBoSLlCllgnnmijWdXeCsaNb0KUdWn k1xMmpvhtuImD/YgPPhrN2zJSj9niHsJsMh3X5z4M4IxrYd8p4wV34c8HdyLLwgq 1q3h3mQi7AFqPXnJ3lMf9RUR2is9mISWoVttYRWQRcteOrNzu9yAcWMoCJrX9IX4 o6tgwn9hs0wn03SWCJImps0WZXuFxrDyygBakG6Zqj9HfKQfpZ7lTVGuKwOwmfCl uTBB57B0zQGb9dX4t+EYINuEIJK8/3r9zLyROYlm3FrgpI4AHSMtrlsLjCD5qTkF XSh6UE8WirBzwdLZZz5R =6rOF -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--