[Bug] bash' read builtin command behaves differently on '\r' (4.3.33)

Eric Blake eblake@redhat.com
Thu Sep 24 16:55:00 GMT 2015


On 05/14/2015 01:32 PM, Mikhail Usenko wrote:
> 
> Cygwin version: 2.0.2-1
> 
> [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)
> 
> 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
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150924/d0a6677d/attachment.sig>


More information about the Cygwin mailing list