delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/05/00:21:10

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 4 Dec 2008 21:18:30 -0800 (PST)
From: "Peter A. Castro" <doctor AT fruitbat DOT org>
To: Eric Blake <ebb9 AT byu DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: How do I prevent zsh from opening pipes and read redirections in text mode?
In-Reply-To: <4937D49E.3030606@byu.net>
Message-ID: <Pine.LNX.4.64.0812042113150.4752@gremlin.fruitbat.org>
References: <3E4278088AD82C48B4663DDFE762CEF305A2DDED AT prga004a DOT ww300 DOT siemens DOT net> <4937D49E DOT 3030606 AT byu DOT net>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, 4 Dec 2008, Eric Blake wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Hudec, Jan on 12/4/2008 1:40 AM:
>> Hello Folks,
>>
>> I have a program (actually a cygwin program -- git-fast-import) that reads commands from standard input and absolutely needs the stream to be binary (byte counts to be read are included in some commands). However, zsh forces it's input to text mode both when I run:
>>  git-fast-import < file
>
> I suppose I could try submitting a patch to the git folks that uses
> #include <io.h> and setmode.  But this also sounds like zsh might be doing
> something wrong.

I don't think that's the problem, nor that that the proposed change above
would help.  Nothing has changed with reguards to Zsh's I/O, stdio or
pipes, between 4.3.4 and 4.3.9.  The Text cooking of file I/O is for
read-only files, and that's only for the shell's own input, really.  The
code for that is in zsh's Src/main.c and it simply uses the
cygwin_internal() hook to set file descriptor behaviour.

In another email, I replied that I can't seem to repro Jan's symptoms.
There maybe something else going on here that's not obvious.

> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             ebb9 AT byu DOT net
> volunteer cygwin git maintainer
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkk31GYACgkQ84KuGfSFAYCZMQCeKNf8hJe0zL/6UIxuwv3uQXVf
> Q1MAoNbFS81yX3XTeoRfCVMPsv5Z/LaI
> =mDvQ
> -----END PGP SIGNATURE-----
>
> --
> 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/
>

-- 
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019