delorie.com/archives/browse.cgi | search |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; q=dns; s=default; b=Y1DQLL | |
mAv6z4tl/praOm/vt5xpHU+hX7qi1XnOtFN0qNZgzlq8cJitQvbE5+NNrD8vERtL | |
rK9rwl/5P5rv0leLGhvU4uNrbsnbwZT7d04JOXIUF8uwBB7bfFiYC8ytL62gNbPZ | |
aVZo5LS2qHZycx9vs8XMNObqp8HwQCWpGZfII= | |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; s=default; bh=m1f2v6nqWZyR | |
Z6E9Az6do/9+DI8=; b=CHqfmll9sd5oYOQLqrDyfehZaJOuSTDbuLjNFkCiWsYy | |
ehLVoVEaxozukv/7bwjGZxYPkbzaVdBPNaoBgOiMFlmx3Ih32owk6+VowYLuKFIk | |
A2jTH0yXW19YRneyFOoVusx1HA6gI1a5dfTmHeb0nxu70aG2Pm9o7Kyp6KKQ0g0= | |
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=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 |
X-HELO: | mx1.redhat.com |
Message-ID: | <55550B73.6030802@redhat.com> |
Date: | Thu, 14 May 2015 14:54:11 -0600 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [Bug] bash' read builtin command behaves differently on '\r' (4.3.33) |
References: | <20150514223211 DOT 790926b378d251d4b25dc82b AT nm DOT ru> <5554FD42 DOT 1060406 AT redhat DOT com> <20150514231823 DOT 5ce367d86ab4dd57d8ba024e AT inbox DOT ru> |
In-Reply-To: | <20150514231823.5ce367d86ab4dd57d8ba024e@inbox.ru> |
OpenPGP: | url=http://people.redhat.com/eblake/eblake.gpg |
X-IsSubscribed: | yes |
--1lpkGTjkq9JBG3anHaIeuFudotGOfAbxs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/14/2015 02:18 PM, Mikhail Usenko wrote: > Also when a bash script is launched from an external program > with connected stdio from/to the program using a UNIX domain > socket generated by socketpair() the read builtin works OK. Thanks for the additional information. I can indeed duplicate that bash is stripping \r\n to \n, but NOT stripping other \r, when reading from a pipe: $ printf ':\r:\r\n' | { read t; echo "-$t-"; } | od -tx1 0000000 2d 3a 0d 3a 2d 0a 0000006 and pipes themselves are not doing the stripping: $ printf ':\r:\r\n' | od -tx1 0000000 3a 0d 3a 0d 0a 0000005 I also confirmed that raw files have the same problem. Possibly a bug I introduced in my code to support igncr, so I'll try to root it out. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --1lpkGTjkq9JBG3anHaIeuFudotGOfAbxs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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/ iQEcBAEBCAAGBQJVVQtzAAoJEKeha0olJ0NqnKcIAKACBVlgCUnsSQs2ee3zglb/ 1cu6kbKgvTDTUdyBFRFH3R6FakDkOpN2oD8E9aQRITW6hMnKo8mF1wzXlFOU4rG3 DuWBR4BFUOqmSdXNWOfSBJr6oT9NOJc51BzXagGzdHbjJqiXM8g7jx6QyPLLi2cH jRYTlqPwkoUQgOxItQ5+vN+ARe0CxEaBX9RrTwBx/9AKAwjS4irDZkz4SNBYfLaw KaHViP35e3PPAgmQoa3O/+x20w1mjS1+T2Zo+DL6Om9T+HZba2DdFgfHqYDHH2r1 2SKvIJM/k8WZpdksGMmLxrr5jxtLTEyNLdrt4pgGe4x0XZbPNefJu6g0oj1POfo= =vNjX -----END PGP SIGNATURE----- --1lpkGTjkq9JBG3anHaIeuFudotGOfAbxs--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |