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

Re: Documentation about Multios is misleading, and perhaps untrue



Bart Schaefer wrote on Thu, 11 Oct 2018 12:12 -0700:
> On Wed, Oct 10, 2018 at 9:05 PM dana <dana@xxxxxxx> wrote:
> >
> > On 10 Oct 2018, at 21:33, Tom Boyd <tvboyd23@xxxxxxxxx> wrote:
> > >What should be done about this ?
> >
> > Not sure if there's really an issue with the rest
> 
> A bit of common sense has to be applied here.  These are redirection
> operators and are going to behave first like redirection operators,
> which means that the shell is going to open the file descriptors
> before executing any of the commands, and then pass those descriptors
> around.  The semantics of redirections demands this.  An external
> command like "cat" receives a list of names in its argument list and
> processes the names one by one, so it can completely open and close
> the file with each name before moving on to the next one, but the
> shell can't do that and would be broken in other cases if it tried.
> 
> It's pointless to try to call call out every possible instance where
> the fundamental semantics of shell operations affect a particular use
> of the syntax.

I won't disagree with such a broad statement, but on the other hand, I
don't think "We shouldn't document this because this is how the OS
limitations force us to implement the shell" is a useful stance, either.
Readers of zshall(1) should not be assumed to be familiar with the C
syscalls and library interfaces' limitations.



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