This is the mail archive of the
mailing list for the Cygwin project.
Re: How is textmode/binmode determined in Cygwin 1.1.0 net releas e for pipes?
- To: "'cygwin at sourceware dot cygnus dot com'" <cygwin at sourceware dot cygnus dot com>
- Subject: Re: How is textmode/binmode determined in Cygwin 1.1.0 net releas e for pipes?
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Fri, 28 Apr 2000 01:36:31 -0400
- References: <1DB8BA4BAC88D3118B2300508B5A552C0C8CDE@mail.fitlinxx.com>
- Reply-To: cygwin at sourceware dot cygnus dot com
On Fri, Apr 28, 2000 at 01:24:36AM -0400, David Bolen wrote:
>So, without asking for too much specific help (treading cautiously here :-))
>- is it possible that line 157 in hinfo.cc should be changed from:
> int bin = __fmode;
> int bin = (__fmode ? __fmode : O_BINARY)
>in order to make the default for stdin/stdout binary even if CYGWIN isn't
>set? That seems to mirror the way that pipe.cc checks things when it's
>making the pipes.
I appreciate the suggestion but I don't think that we can do that. The
fact that stdout didn't default to text mode and didn't track the
CYGWIN=binmode setting was actually a bug in b20.1. This is all coming
back to me now. We had complaints about this so we changed it in the
snapshots and later for the Cygwin CD.
Pipes are a separate issue since they are usually simple conduits and
shouldn't be translating data.
>I haven't yet run a full build of the DLL locally, so I'll have to schedule
>some time tomorrow to do that to test the change locally? But adding a
>setmode(O_BINARY) on both stdin and stdout in the rsync code did resolve the
>problem without having to add the CYGWIN environment variable.
I think that's probably the best solution, actually. There is also a
currently undocumented way to set a program's "CYGWIN settings" in the
registry by setting something a value for:
HKLU/Software/Cygnus Solutions/Cygwin/Program Options/c:\usr\local\bin\rsync.exe
I really hate this text mode/binary mode stuff. I wish it had never
been invented. I think we'd probably have fewer problems if we hadn't
tried to be so clever. Now, we're stuck with it, though.
Want to unsubscribe from this list?
Send a message to email@example.com