Comment 2 for bug 892317

Revision history for this message
Jarno Suni (jarnos) wrote :

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.