This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: pgpHniPel2Qmo.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]