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

Re: The bug from workers/44922



Op 16-12-19 om 06:27 schreef Daniel Shahaf:
Martijn Dekker wrote on Sun, Nov 24, 2019 at 06:54:18 +0100:
[...]
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.

As Peter observed in 45037, could you elaborate on why the inner 'kill' should
abort execution of the trap?

I can't see much to elaborate on. After unsetting a trap, a signal should revert to its default action, which in this case is "abnormal termination" (i.e. termination with a > 128 exit status specifying the signal). The fact that all this happens within a trap action should not make any difference.

- Martijn

--
modernish -- harness the shell
https://github.com/modernish/modernish



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