Cygwin hangs up if several keys are typed during outputting a lot of texts.

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Mar 5 13:31:00 GMT 2015


On Mar  5 20:24, Takashi Yano wrote:
> 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)".

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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150305/8c6dce4b/attachment.sig>


More information about the Cygwin mailing list