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

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Apr 3 11:32:00 GMT 2015


Hi Takashi,

On Apr  3 13:07, Takashi Yano wrote:
> On Thu, 5 Mar 2015 13:59:01 +0100
> Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> > > 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.
> 
> For the same reason, I propose the following patch.
> 
> 2015-04-03  Takashi Yano  <takashi.yano@nifty.ne.jp>
> 
> 	* fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of
> 	"readlen" not to use "bytes_in_pype" value directly.

Thanks, patch applied.

Btw., we have a regression in the latest PTY code in terms of some
native Windows tools.  I noticed this with `icacls':

With Cygwin 1.7.35:

  $ icacls xxx
  xxx VINSCHEN\corinna:(W,D,Rc,WDAC,WO,X,DC,RA)
      VINSCHEN\vinschen:(W,Rc,X,DC,RA)
      Everyone:(W,Rc,X,DC,RA)

  Successfully processed 1 files; Failed processing 0 files

With git HEAD:

  $ icacls xxx
  xxx VINSCHEN\corinna:(W,D,Rc,WDAC,WO,X,DC,RA)
						   VINSCHEN\vinschen:(W,Rc,X,DC,RA)
       Everyone:(W,Rc,X,DC,RA)

			      Successfully processed 1 files; Failed processing 0 files

This does not occur in a Windows console window, so it seems this has
been introduced by the PTY changes.

If you look into the output generated by icacls, you'll notice that it
only generates POSIXy LF line endings, not Windowsy CRLF.  The CRs
required to generate correct output are missing now for some reason, but
only for native, non-Cygwin clients.

Would you mind to have a look into this issue?


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/20150403/fbde12cf/attachment.sig>


More information about the Cygwin mailing list