The behavior seems to have changed in later version. I tested dash 0.5.10.2-6. There EXIT trap is not run at all, if -e is used, and you use Ctrl-C. But if you remove the 'exit 2' from the signal trap, EXIT trap will be run regardless of -e setting, when you press Ctrl-C. That is not intuitive. So I think EXIT trap should be run even in case of -e. However, if you do not need custom exit status for the signal trap, you could just remove the exit builtin.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/892317 Title: set -e reverses order of signal handlers To manage notifications about this bug go to: https://bugs.launchpad.net/dash/+bug/892317/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
