This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Perl binmode problem on text mount


Christopher Faylor wrote:

On Thu, Nov 04, 2004 at 10:49:46PM +0100, Gerrit P. Haase wrote:

Christopher Faylor wrote:

Pipes are binmode by default.

That means they are just as pipes are ought to be, "what goes in comes out again, not more and not less"?

Or does it mean that a pipe always strips \r?  Then the cat example of
the OP doesn't count at all.


binmode means there is no extra processing on the fd.  It is handled
just like linux.  Linux doesn't add or subtract any characters when
it is doing I/O.

You're right, though.  The cat example really doesn't provide any useful
details.  In fact, cat will output in text mode in some cases.

The definitive test would be to run the older and newer versions of
perl on the newest version of cygwin.  If the output using 'binmode'
differs between the two then perl is doing something wrong.  If it
is the same then cygwin is doing something wrong.

I saw that the output differs between perl-5.6.1 and perl-5.8.5 with the example from the OP.
This means that someone should file a bug report to the perlbug
facility. I rewrote the example, and then I saw that perl does the
right thing on 'normal' filehandles, but obviously not if the filehandle is STDOUT.


Gerrit
--
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]