Subject: [b18] Are pipes always in text mode?
From: [email-masked] (Francis Litterio)

30 May 1997 19:12:11 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Original-To: [email-masked]
X-Mailer: Forte Agent 1.01/32.397
Original-Sender: [email-masked]

I checked the FAQ and the list archives, but found nothing about
this...

In the b18 release, I'm using binary mounts, but I'm seeing
text-mode-style CRNL->NL conversions on data sent down a pipe:

	$ od -c foo
	0000000   h   e   l   l   o  \r  \n
	0000007
	$ od -c < foo
	0000000   h   e   l   l   o  \r  \n
	0000007
	$ cat foo > bar; od -c bar
	0000000   h   e   l   l   o  \r  \n
	0000007
	$ cat foo | od -c
	0000000   h   e   l   l   o  \n
	0000006

First, the inconsistent text/binary mode for redirection versus pipes
can probably be considered a bug.  File descriptor 1 is sometimes
text-mode and sometimes binary mode depending on how the application
was spawned by the shell!

Second, is there any way to make all data traversing pipes be treated
as binary (without recompiling anything)?  If not, perhaps there can
be a mount option that controls the text/binary distinction for
redirected and piped file descriptors (for those of us who wish to
live in an all-binary-all-the-time GNU-Win32 world).
--
Francis Litterio                     PGP Key Fingerprint:
[email-masked]                  02 37 DF 6C 66 43 CD 2C
http://world.std.com/~franl/         10 C8 B5 8B 57 34 F3 21

"They that can give up essential liberty to obtain a little temporary 
 safety deserve neither liberty nor safety." -- Ben Franklin, ~1784
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".