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

Re: [BUG] exec + builtin and traps



On Tue, 12 Sep 2017 13:42:20 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> BTW, the way zsh handles "eval" is still strange:
> 
> ----------------------------------------
> trap 'echo foo' USR1
> ( sleep 1; kill -USR1 $$; ) &
> eval "wait && echo bar"
> echo OK
> ----------------------------------------
> 
> outputs
> 
> foo
> bar
> OK

That'll be another effect of NO_ASYNC_TRAPS --- the list being executed
is what's in quotes, and it's after that that the trap gets run.  I
don't think NO_ASYNC_TRAPS behaviour is standardised.

pws



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