Mail Archives: cygwin/2015/04/03/07:32:48
--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 -