This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I prevent zsh from opening pipes and read redirections in text mode?


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@byu.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@fruitbat.org> or <Peter.Castro@oracle.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]