[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/4] Cross compiling sharutils
From: |
Eric Blake |
Subject: |
Re: [PATCH 0/4] Cross compiling sharutils |
Date: |
Fri, 22 May 2015 15:32:13 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 05/21/2015 10:50 PM, Filipe Brandenburger wrote:
> TL;DR: cygwin doesn't seem to need popen("rb") though mingw definitely does.
>
> Even though cygwin does differentiate "r" and "rb", it my tests it
> seemed to be using binary by default. Not sure if that's a cygwin
> environment setting or if it was detecting that gzip output "looked"
> binary and was using binary that way...
Actually, https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
documents that CYGWIN=nopipe_byte defined in your environment will force
cygwin to default to handling pipe contents in text mode (the default is
pipe_byte, which handles pipe contents in binary mode). Using
popen("rt") forces text mode; popen("rb") forces binary mode, and
popen("r") uses the settings of $CYGWIN to decide which mode to use
(usually binary, as the default of pipe_byte was set for a reason).
If you MUST test text mode pipes on cygwin, then you'll have to
experiment with changing $CYGWIN
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH 1/2] Use O_BINARY to detect whether to pass "rb" to popen, (continued)
- Re: [PATCH] Use O_BINARY to detect whether to pass "rb" to popen, Filipe Brandenburger, 2015/05/29
- Re: [PATCH] Use O_BINARY to detect whether to pass "rb" to popen, Bruce Korb, 2015/05/29
- Re: [PATCH 0/4] Cross compiling sharutils, Eric Blake, 2015/05/21
- Re: [PATCH 0/4] Cross compiling sharutils, Eli Zaretskii, 2015/05/21
- Re: [PATCH 0/4] Cross compiling sharutils, Filipe Brandenburger, 2015/05/22
- Re: [PATCH 0/4] Cross compiling sharutils, Eli Zaretskii, 2015/05/22
- Re: [PATCH 0/4] Cross compiling sharutils,
Eric Blake <=
- Re: [PATCH 0/4] Cross compiling sharutils, Eli Zaretskii, 2015/05/21
- Re: [PATCH 0/4] Cross compiling sharutils, Eli Zaretskii, 2015/05/21