delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/03/07:32:48

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=RmIqkI4lP1wvJ+XdX71olMuCjD5b6OtEC7M5y0EJfE+mWMffimBK+
fJKC5cVzREQpgapOyYnYD7dyaAXeMwFy7CwJ6LGNSQhSo7uiDCz+qwpZZoYXjC50
j+UD6lTec46izZu9QrOOyy2Rs9vMccOo51m2xZqKEnCRHAQSNApjSs=
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=oD2cyJ3cFqfczScL0O0SCj0cClI=; b=Xtm09gT6dujAVDemNmF8cB8/m0Jy
rhTrUGZ/AvE7BzMqv6I2nHgbgV1UH+eppZePNzDprae3P/1+1f+tuh8beTsvVwad
z7tyRTP+yALlpr1mqhET2xLXKOKPhvYxyDwnioNpHLApA5XUX9Om/4ktNFXFVfH/
FGVsoFfcXpWDKYE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 3 Apr 2015 13:32:26 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin hangs up if several keys are typed during outputting a lot of texts.
Message-ID: <20150403113226.GP13285@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> <20150305125901 DOT GX3213 AT calimero DOT vinschen DOT de> <20150403130735 DOT d04e41875f7defd0e6c2d8d0 AT nifty DOT ne DOT jp>
MIME-Version: 1.0
In-Reply-To: <20150403130735.d04e41875f7defd0e6c2d8d0@nifty.ne.jp>
User-Agent: Mutt/1.5.23 (2014-03-12)
Note-from-DJ: This may be spam

--ixNtouB4hv1hrEz3
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Takashi,

On Apr  3 13:07, Takashi Yano wrote:
> On Thu, 5 Mar 2015 13:59:01 +0100
> Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote:
>=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)".
> >=20
> > Thanks, done.  I applied the patch now with two additional changes for
> > better error handling.
>=20
> For the same reason, I propose the following patch.
>=20
> 2015-04-03  Takashi Yano  <takashi DOT yano AT nifty DOT ne DOT jp>
>=20
> 	* 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

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--ixNtouB4hv1hrEz3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVHnpKAAoJEPU2Bp2uRE+gnxEQAJC4DHGSC0ozGyyDvucTYcnJ
fr/4e39HTTfj3hjk5hGGc98YeD6ZTGumgBpUTjCDilp63rzLvCkT+A72DP2vxdOt
Ke/KHCpFG8KVmu2HtX51EOQLe8ooP3tJh4sEDmhVyKCV7wsq1YODV0/cBKkOMugg
lc28r9CE/9cfYsfuBZ2wblEAS97n25crWP8rFWSZH6PgYZW4366W7m0PMxvO8YDH
mqbtt5u/VpHLYrNRrUoTCUGxkMUPn+gLxl9ONcnYLk0HryXeC89fXX9n9DiFLhRa
gwPPl0XVXInUGzxX0uSaZ1ZWxqwbup9Ue2prWlTnBF0oSAMBbkyXAfG1FD9fCiGH
MPYMbSYK97V5M66NFWnf/FsLL9NkRfyCjTsNM7C1n3u1ZQ0jumGAJ+NQ/ShEo2M4
tvk48KMuvwdFHioyb4yz5FykkiKeMFftkSULYAz6RZfuJUfPPSWrS2fAXzjlFPAu
c/znJ8h9tAhisyd6kjaWqW4ae38eukNMODcU0J5bUD7vOFZVw22edJHr24iEuYcH
s1BJCYXj7UERq9fp4RUfii2UXjAbSpJ+NaETgaStwk4gste4x4GZ4QbCSqtWBL/f
q5M9FV4gsiPCjmq/pHY1za9XApa4Dt2qLOHqqI5OQHBzDQvl5R8BUr3GnYlW1A2h
Em2pvZETQ69aiL51rzXk
=pgnX
-----END PGP SIGNATURE-----

--ixNtouB4hv1hrEz3--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019