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

Re: zsh vs. ksh coproc redirection semantics



Bart wrote:
> I'm curious.  In zsh and bash (which also lacks the <&digit- form), <&-
> closes the standard input of whatever command it suffixes, not of the
> shell itself.  Which must mean that (semantically, if not in actual
> implementation) stdin is first dup'd (as it always is when running a
> new command) and then the dup is closed.

When running an external command the stdin is closed after fork thus
not affecting the shell.  Non special builtins should behave like
external commands.

Now the >&p case seems to be special in pdksh, as this does affect the
shell.

It looks like these coproc redirection really works well only with
exec, the rest is implementation dependent.

Zoli



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