delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/04/17:12:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 4 Nov 2004 17:12:28 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Perl binmode problem on text mount
In-Reply-To: <20041104220056.GG16067@trixie.casa.cgf.cx>
Message-ID: <Pine.GSO.4.61.0411041710380.295@slinky.cs.nyu.edu>
References: <41897FF4 DOT 1080501 AT agilent DOT com> <418A9BF3 DOT 5010903 AT familiehaase DOT de> <20041104212608 DOT GC16067 AT trixie DOT casa DOT cgf DOT cx> <418AA3FA DOT 7080905 AT familiehaase DOT de> <20041104220056 DOT GG16067 AT trixie DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Thu, 4 Nov 2004, 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.
>
> cgf

I thought the OP did exactly that in
<http://cygwin.com/ml/cygwin/2004-11/msg00168.html>...

FWIW, the following two invocations of perl from a text mount differ in
their result:

perl -e 'open OUT,">q.txt";binmode OUT;print OUT "Hello\n"'
perl -e 'binmode STDOUT;print STDOUT "Hello\n"' > q.txt

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019