Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Under Cygwin ZSH, "diff -" fails unless forced into text mode

On Thu, 17 Jul 2008 23:01:39 +0200
<Gerald.Williams@xxxxxxxxxxxx> wrote:
> > There's some Cygwin-specific code in main.c to force read-only files
> > into text mode.  This is a fairly murky area and I have no idea how that
> > affects pipes.
> I'm not sure where you're headed with that one, but it
> appears that ZSH is making the pipe appear as a binary
> stream in this case. Forcing it *back* to text is what
> fixes the problem.

I meant I supect the code that sometimes fixes things up may well not be
kicking in in this case, but I don't understand it.  Cygwin needs to
do strange things and it's not clear to me why binary mode would make a
pipe harder to seek on than text mode; I would expect the opposite.

I don't even know how Cygwin expects you to set the mode on a pipe;
possibly with fcntl().

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

Messages sorted by: Reverse Date, Date, Thread, Author