Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Under Cygwin ZSH, "diff -" fails unless forced into text mode
- X-seq: zsh-users 13041
- From: Peter Stephenson <pws@xxxxxxx>
- To: <zsh-users@xxxxxxxxxx>
- Subject: Re: Under Cygwin ZSH, "diff -" fails unless forced into text mode
- Date: Fri, 18 Jul 2008 09:52:25 +0100
- In-reply-to: <D296F3258FB4964D9EBA55141AC6F990056D99FB@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20080717085929.2356@blackhawk> <20080717195646.2c69e9b7@pws-pc> <D296F3258FB4964D9EBA55141AC6F990056D99FB@xxxxxxxxxxxxxxxxxxxxxxxx>
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