X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Ug2ERyE1EKM61Xh/YwJXH7U+JXjWJam9lNyaXbZHiHp5113ykpFk1 mWL8y1ToGdjuhex56PX7Sjd4chrgDBkFBUQKYConrhnYgb+DWEvcgmx5m9XYoUPj TOhftWLj3zsdOf9XbIPlYN3SuyzjNgVI/28lx80EDvJtzKxf121kpw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=BU+vaxfyChSeD2Cswe0Xvv/snmo=; b=RcrnFrsbENvd/H6GU+kNYI1pdq02 7Y9b7fi4sFNNMLL4PBuSfgXyu5Zk/q0VvMMdWYmDNexVLLqlY2Bm9ItG2JxVB7fv h+HtQbbWEnJJT8OZK1nbPv3aPGnzs+UuitryJ7ELlU09PsPIw9QCbBJK9GgjWSxK NCE7gpFxkaqnMLs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Thu, 5 Mar 2015 13:59:01 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT 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 AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20150228144019 DOT 0e4cfdb3a26bfac361b538e2 AT nifty DOT ne DOT jp> <20150228140251 DOT GA11124 AT calimero DOT vinschen DOT de> <20150302204502 DOT 39b3e03ad5084b0b5add5d10 AT nifty DOT ne DOT jp> <20150302144426 DOT GK3213 AT calimero DOT vinschen DOT de> <20150304203407 DOT 14008531b0fb63ad5c19a33f AT nifty DOT ne DOT jp> <20150304121952 DOT GL3213 AT calimero DOT vinschen DOT de> <20150304181857 DOT GM3213 AT calimero DOT vinschen DOT de> <20150305202456 DOT 9ac4815a9d590145e15f7ae2 AT nifty DOT ne DOT 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) --D5arhb13WwWKLIR9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 -----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--