title: Is trap EXIT required to execute in case of SIGINT or SIGTERM received?
body: <p>I have a simple script</p>
  
  <pre><code>trap 'echo exit' EXIT
  while true; do sleep 1; done
  </code></pre>
  
  <p>and it behaves differently in different shells:</p>
  
  <pre><code>$ bash tst.sh
  ^Cexit
  $ dash tst.sh
  ^C
  $ zsh tst.sh
  ^C
  $ sh tst.sh
  ^Cexit
  </code></pre>
  
  <p>So I'm not sure about how it should operate and whether it is specified at all.</p>