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

Re: PATCH: 3.0.6/3.1.6: Re: All sorts of file-descriptor strangeness



Bart Schaefer wrote:
>zagzig[21] coproc tr a-z A-Z
>[1] 2510
>zagzig[22] exec 5<&p
>zagzig[23] ls -l /proc/self/fd
...
>Should descriptor 5 have been passed on to "ls" in this manner?

Yes.  You explicitly opened fd 5; it should be passed on to child
processes that you create.

>                                                    In particular, I think
>it would break this:
>
>    coproc foo
>    bar <(baz <&p)

Ah.  It probably would.  The coprocess fds are more of a special case
than I realised.

-zefram



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