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

Re: process substitution bug with set -e?



On Mon, 14 Oct 2013 17:08:45 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> I can see that it has the same behavior as, for instance:
> 
>   { echo foo; exit } >>(sleep 1; cat -n)
> 
> Again, one may wonder whether the shell should exit immediately.
> Is this clearly documented somewhere?

These interactions between different features are definitely not clearly
documented.  This formally quadratic problem  --- it's not actually as bad
as (features)**2, of course --- is still fairly horrific in the case of
zsh.

I note that with a subshell, in

  ( echo foo ) >>(sleep 10; cat -n)

the shell waits but in

  ( echo foo; exit ) >>(sleep 10; cat -n)

it doesn't.  So this must mean the logic for waiting is inside the
subshell.  This surprised me.  I don't know if this has implications for
what's going on in the case of { ... }.

pws



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