public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Cygwin hangs up if several keys are typed during outputting a lot of texts.
Date: Thu, 05 Mar 2015 12:12:00 -0000	[thread overview]
Message-ID: <20150305202456.9ac4815a9d590145e15f7ae2@nifty.ne.jp> (raw)
In-Reply-To: <20150304181857.GM3213@calimero.vinschen.de>

On Wed, 4 Mar 2015 19:18:57 +0100
Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:

> 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.

Thank you, Corinna.

I have tried your patch. It nicely works for me, too.
And your workaround is definitely better than mine.

One small thing to be improved is here:

+      if (echo_cnt > 0
+	  && ReadFile (echo_r, outbuf, MIN (rlen, echo_cnt), &n, NULL))

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.

Therefore, "rlen" should be used here rather than
"MIN (rlen, echo_cnt)".

By the way, should we go to cygwin-developer mailing list?

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2015-03-05 11:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28 12:40 Takashi Yano
2015-02-28 13:16 ` Denis Excoffier
2015-02-28 17:56 ` Corinna Vinschen
2015-03-02 11:45   ` Takashi Yano
2015-03-02 14:44     ` Corinna Vinschen
2015-03-02 14:50       ` Corinna Vinschen
2015-03-04 11:36       ` Takashi Yano
2015-03-04 12:43         ` Corinna Vinschen
2015-03-04 18:22           ` Corinna Vinschen
2015-03-04 20:25             ` Corinna Vinschen
2015-03-05 12:12             ` Takashi Yano [this message]
2015-03-05 13:31               ` Corinna Vinschen
2015-04-03  4:07                 ` Takashi Yano
2015-04-03  4:19                   ` Takashi Yano
2015-04-03 11:32                   ` Corinna Vinschen
2015-04-04  6:55                     ` Takashi Yano
2015-04-04  8:43                       ` Corinna Vinschen
2015-04-05 11:54                         ` Takashi Yano
2015-04-07  9:11                           ` Corinna Vinschen
2015-04-13 10:31                             ` Takashi Yano
2015-04-14  7:35                               ` Corinna Vinschen
2015-04-16  0:26                                 ` Takashi Yano
2015-04-16  9:05                                   ` Corinna Vinschen
2015-04-16  9:10                                     ` Corinna Vinschen
2015-04-17 11:27                                     ` Takashi Yano
2015-04-17 12:10                                       ` Corinna Vinschen
2015-04-17 12:25                                         ` Corinna Vinschen
2015-04-20 11:40                                         ` Takashi Yano
2015-04-20 15:12                                           ` Corinna Vinschen

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=20150305202456.9ac4815a9d590145e15f7ae2@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --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).