X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 	tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4BD59C0E.3070900@redhat.com>
Date: Mon, 26 Apr 2010 07:58:38 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: zsh 4.3.9-1: text-mode stdin problem (breaking base64)
References: <4BCEBF96.3030201@jade.plala.or.jp> <alpine.LNX.2.00.1004231627020.4090@gremlin.fruitbat.org> <4BD35527.8020101@jade.plala.or.jp>
In-Reply-To: <4BD35527.8020101@jade.plala.or.jp>
Content-Type: multipart/signed; micalg=pgp-sha256;  protocol="application/pgp-signature";  boundary="------------enig78B7653FBB61B412C1D36FD2"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enig78B7653FBB61B412C1D36FD2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 04/24/2010 02:31 PM, Yutaka Amanai wrote:
>>
>> Have a look at Bash code some time. I recall seeing some O_TEXT options
>> being set in the various {f}open()'s that it does.

There are a few of those, but I've been working at reducing them to the
bare minimum, and instead controlling it via the igncr option.

> I took a look at Bash code and found it sometimes opens filehandles in
> text-mode, although I didn't read in detail. Anyway, Bash is also
> apparently not perfect (for example, it can't read CRLF scripts on
> binary-mode filesystems),

That's not true.  If you use the igncr shell option, then bash ignores
CR and does just fine with CRLF scripts on binary-mode file systems.
It's just that you have to request it; it is not default behavior,
because the default is to match Linux of favoring binary-only solutions.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig78B7653FBB61B412C1D36FD2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJL1ZwRAAoJEKeha0olJ0NqzTMH/33LQ9B9mFwM3FyUqncbDwlR
23BnrQcYmuDs2lNpVQTDBlVlZS+ZGjSWZsYb83QJXteYGesGDOVvle9/jPOyBt/s
UIrRrtF0DWIAliDdj1jRsNr2V2aTZgNnX4BMFc1j+CP+iTd9zwHedDILJAKOeoz8
9Ae/R1BngJ/xe4Cw1CmWrPFjH1ZU0RNAD6jwgZyyN0keCGD1jR5Qvqocs3qXRZuD
w5pT8fFLY+UFx4Hpb5eyNKQbN4zd+7Dw3PTWJQ5Oe/MnSU//1u+GEJDWQX/sExFj
A8QYsAy5xvtsSjO4DQzwSK8NJ+9/X3UkKcPS338I0t5ebXk1WJPkKGUaEapoOy4=
=XVwZ
-----END PGP SIGNATURE-----

--------------enig78B7653FBB61B412C1D36FD2--
