Mail Archives: cygwin/1997/06/13/19:50:04
In the patch that I posted below for bash, I neglected to set pipes in
binary mode. The fix is a small change to execute_cmd.c, where there
is an explicit call to setmode(fd, O_TEXT) for pipes. I'm not sure
what the intension was in placing pipes in TEXT mode, but I would
rather have binary mode pipes. This allows commands like
"zcat bash.tgz | tar xvf -". I put the update in the same place,
http://www.cs.cornell.edu/home/jyh/cygwin32/
Jason
Larry Hall writes:
> Thanks! This is excellent. I've been planning to do something about this
> oversight for quite a while but haven't gotten around to it. I really
> haven't looked at what you've done yet but perhaps you can tell me, does
> your change also fix the similar problem with pipes?
>
> Larry
>
> At 11:04 AM 6/12/97 -0400, you wrote:
> > > At 11:29 AM 6/11/97 +0100, you wrote:
> > > >Hi everybody,
> > > >
> > > >Trying to write gif file in stdout with 'putchar'. b18 seems to add a CRNL
> > > >every CR he
> > > >founds in the file.
> > >
> >
> >I've run into the same problem--for instance, if "x" is a binary file,
> >the commands "dd if=x of=y" and "dd if=x > y" produce different
> >results ("cat x > y" doesn't work because cat opens its input in TEXT
> >mode). This is an incredible headache, but the fix is pretty easy.
> >
> >You need to recompile bash, which always opens redirects in TEXT mode.
> >You can download my patched copy of bash at
> >
> > http://www.cs.cornell.edu/home/jyh/cygwin32/
--
Jason Hickey Email: jyh AT cs DOT cornell DOT edu
Department of Computer Science Tel: (607) 255-1372
Cornell University
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -