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:
>If we continue to limit the FDs on the LHS to 0-9, then we can simply
>report EBADF whenever one of the "private" FDs appears on the RHS.

Ah yes, a neat solution.  This is definitely an improvement over my patch,
and doesn't require use to actually shuffle private fds around at all.

>I'd further point out that with the /proc/*/fd filesystem available, the
>shell would have to go to nearly impossible lengths to prevent its private
>FDs from becoming visible;

That's a slightly different matter.  The shell provides a view of a set
of fds which gets passed on to programs run from the shell; this is what
the redirections manipulate.  Conceptually it has no inherent connection
with the actual OS-level fd table of the shell process.  Anyone that
fiddles with /proc/*/fd for a process that they don't actually control
at the fd level is just asking for trouble.


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