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]

Perl binmode problems on text mounts


I'm trying to make sure our perl program works with text mounts.  In the
course of the testing, one weird problem cropped up: binmode seems to have
no effect on STDOUT when redirecting to a file on a text mount.

The following consistently reproduces the problem for me:

$ mount -m | grep text
mount -f -u -t "c:/cygwin/tmp/text" "/tmp/text"
$ cd /tmp/text
$ /usr/bin/perl -e 'binmode(STDOUT);print "\n"' > PT
$ od -c PT
0000000  \r  \n
0000002
$

I've tried various combinations of ":raw", ":perlio", etc, both directly
and through the PERLIO variable, with no success.  The strace output
(available upon request) seems to show that the handle is successfully set
to binary mode, but that the write still happens in text mode.

Can anyone else reproduce this?  Is there a way I can force binary mode on
STDOUT in Perl?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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