Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with traps and exit
On Sun, 24 Nov 2019 at 23:52, Martijn Dekker <martijn@xxxxxxxx> wrote:
> A related issue (possibly the same?) with a much simpler test case:
>
> trap 'echo SIGINT; trap - INT; kill -s INT $$; echo woops' INT
> kill -s INT $$
>
> zsh prints 'woops', but shouldn't.
One thing – this one doesn't reproduce in the exact sense – either
from the command line or from a script. Second – however, this prints
the "test":
trap 'echo SIGINT; trap - INT; kill -s INT $$; echo woops' INT
kill -s INT $$
print test
when run as a script or from command line. But I guess that the
default INT trap is a 'return' which doesn't cause the shell to exit?
This isn't stated exactly in the manual.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author