From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35788 invoked by alias); 24 Sep 2015 16:55:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 35780 invoked by uid 89); 24 Sep 2015 16:55:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 24 Sep 2015 16:55:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id B2655C0798E8; Thu, 24 Sep 2015 16:55:46 +0000 (UTC) Received: from [10.3.113.166] (ovpn-113-166.phx2.redhat.com [10.3.113.166]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8OGtkCD029855; Thu, 24 Sep 2015 12:55:46 -0400 Subject: Re: [Bug] bash' read builtin command behaves differently on '\r' (4.3.33) To: cygwin@cygwin.com, Jeff Downs References: <20150514223211.790926b378d251d4b25dc82b@nm.ru> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <56042B11.3060201@redhat.com> Date: Thu, 24 Sep 2015 16:55:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150514223211.790926b378d251d4b25dc82b@nm.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Bt7HBBKf5xfilVsAMVomG6wWjFmkmg642" X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00413.txt.bz2 --Bt7HBBKf5xfilVsAMVomG6wWjFmkmg642 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 920 On 05/14/2015 01:32 PM, Mikhail Usenko wrote: >=20 > Cygwin version: 2.0.2-1 >=20 > [linux]$ bash --version > GNU bash, version 4.3.33(1)-release (i686-redhat-linux-gnu) > [cygwin]$ bash --version > GNU bash, version 4.3.33(1)-release (x86_64-unknown-cygwin) >=20 > Testcase: > [linux]$ echo -ne "\r\n" | { read t; echo "$t"; } | od -A n -t x1 > 0d 0a > [cygwin]$ echo -ne "\r\n" | { read t; echo "$t"; } | od -A n -t x1 > 0a >=20 > But then, the pipe itself is OK: > [cygwin]$ echo -e "\r" | od -A n -t x1 > 0d 0a Jeff Downs helped me investigate off-list, and I think he found the culprit (a typo in input.c that requested O_TEXT when it meant B_TEXT, when mapping from open() flags to bash's internal B_* flags). I'm building a new bash build right now, and will shortly be posting it for testing. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Bt7HBBKf5xfilVsAMVomG6wWjFmkmg642 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWBCsRAAoJEKeha0olJ0NqqOIH/iBxcOUJlRl2CE0hKeKuHkcO pn2DIBECzxm9LeTZ7JIvFWhPkibKYCcRPK/5APs5ptOmLRn8dD35Jcm5bvKarYN9 BIQrQosh98wuC2HDdYxMv4NvWIJZYESVtZK5aaunTPJ0kWKRV6vWg3WSOxKi3tBJ sC0/b2ISvYtA9188NnekrIUMlCv8AtZIdId0bDupiPhkAnyUglT0SherrHxDto6C xVxDMwJ2pjSRmYzttwpojD1xQSq8CMHNWaBj9gf6GXYVRyuaYs/PDlNgrZmRJyRr sn0tUPpgr80xhkAWaeDXCOqZbOg7+/nGt9P903WQKDnPWhZUtARa/TsP81q9798= =Vb7T -----END PGP SIGNATURE----- --Bt7HBBKf5xfilVsAMVomG6wWjFmkmg642--