From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7241 invoked by alias); 5 Mar 2015 12:59:04 -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 7233 invoked by uid 89); 5 Mar 2015 12:59:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Mar 2015 12:59:03 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 32BDBA80930; Thu, 5 Mar 2015 13:59:01 +0100 (CET) Date: Thu, 05 Mar 2015 13:31:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cygwin hangs up if several keys are typed during outputting a lot of texts. Message-ID: <20150305125901.GX3213@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20150228144019.0e4cfdb3a26bfac361b538e2@nifty.ne.jp> <20150228140251.GA11124@calimero.vinschen.de> <20150302204502.39b3e03ad5084b0b5add5d10@nifty.ne.jp> <20150302144426.GK3213@calimero.vinschen.de> <20150304203407.14008531b0fb63ad5c19a33f@nifty.ne.jp> <20150304121952.GL3213@calimero.vinschen.de> <20150304181857.GM3213@calimero.vinschen.de> <20150305202456.9ac4815a9d590145e15f7ae2@nifty.ne.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="D5arhb13WwWKLIR9" Content-Disposition: inline In-Reply-To: <20150305202456.9ac4815a9d590145e15f7ae2@nifty.ne.jp> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-03/txt/msg00072.txt.bz2 --D5arhb13WwWKLIR9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1418 On Mar 5 20:24, Takashi Yano wrote: > On Wed, 4 Mar 2015 19:18:57 +0100 > Corinna Vinschen wrote: >=20 > > The result is the patch I attached to this mail. I'm not sure it's the > > most feasible way to solve this problem, but it works pretty nicely for > > me, including pasting big chunks (I tried a clipboard with about 70K > > of data) while yes(1) is running. >=20 > Thank you, Corinna. >=20 > I have tried your patch. It nicely works for me, too. > And your workaround is definitely better than mine. >=20 > One small thing to be improved is here: >=20 > + if (echo_cnt > 0 > + && ReadFile (echo_r, outbuf, MIN (rlen, echo_cnt), &n, NULL)) >=20 > echo_cnt returned by ::bytes_available() is actually > not a number of bytes available in the pipe. This is > because ::bytes_available() returns "nleft" instead > of "navail" when "nleft" is non-zero. >=20 > Therefore, "rlen" should be used here rather than > "MIN (rlen, echo_cnt)". Thanks, done. I applied the patch now with two additional changes for better error handling. > By the way, should we go to cygwin-developer mailing list? Nah, not for this one. For the next bigger issue, that would be nice, especially if you come up with code and stuff :) Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --D5arhb13WwWKLIR9 Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU+FMVAAoJEPU2Bp2uRE+gbpgP/3YiaHXz+5dMoHR6Q3k3uqBt wJ4xrhJtyjJp7TnxoyAtE9OpRwxUxK6hlnsvcU1f1yzqxxOyXiiIQy5en5zXgWxN 8Umxzdy1DwoeRAgyKr3U818ZNJS8rYflLsty70GCw4G9XaH3bcdORqJVELc2IGb2 5BRi+ihOeirYJJhqjP1qoQ2zCbDGwqJO10TeP2CqhPIILzFfvaG3Bvn5k/Y5vtFT /aZ/P5lIHnlu3qdM1r7fsqoE1KuLLakd9U5g+OwgtdFCzE6Z3pijl3KzHsB17aLk +fwgwPCG+CYhW7Dk0dpYovMmkpRDy3i6eL6K3ztToltwzWqrD2cT4j2s8IgPwy6y MG9Dl+UmHixnlYYXKu1MG8D51z0uBQ1YzQLxumFujE5xDozA5SdKKj1cSShB+TKR l04+u+uNdd5E9UPWdKhtyRePaTsZftl80Vh2p072J+x333OOy1FhHGB9baNm9xNx lAe9jPB7KZb3j3/Dd8MDQ/Dbwqe4iree9xSM+QILJW+orQyF9HC2q4uPsfUPsaAl aHS6maPX5zRWL/To3ZmaqoU+ZnaYsloWm7X6dkxwAlL1QJsmSxg7pQ1q4c4anfaU z58X3GsiryRPqmhiFeia/sJnCpG32lkBY+TU4/gjpDJ8VHF/m7TEIE5J3h/QiOnT SH4ZOldw5VeBEjSzFKcD =FOpA -----END PGP SIGNATURE----- --D5arhb13WwWKLIR9--