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

Re: Possible ZSH bug with IO direction

On Mon, Apr 25, 2016 at 10:31 AM, Peter A. Castro <doctor@xxxxxxxxxxxx> wrote:
> I believe the best solution is to teach Zsh code to handle CR+LF properly,

Which means we're back to the "dozens of source modules" you mentioned.
There's no central place for this; because of vagaries of other I/O systems
(e.g. STREAMS modules), there's not even a consistent use of stdio vs.
low-level read/write (though at least they're usually not mixed on the same

I haven't looked closely at this (and have no idea whether it's possible with
the pre-main hook in place) but perhaps put the descriptors back into
binary mode somewhere in exec.c between whatever passes for zfork()
on cygwin and the actual execve() of any external process?  We mostly
know when a zsh builtin vs. an external command is being run.

Either way the external commands are on their own -- the question is
whether they're better off getting binary when they expect text or the
other way around (as currently).

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