title: Exit after trap fires
body: <p>Take this script</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/sh
  
  fd ()
  {
    echo Hello world
    exit
  }
  
  trap fd EXIT INT
  
  for g in {1..5}
  do
    echo foo
    sleep 1
  done
  </code></pre>
  
  <p>I would like <code>fd</code> to fire once, either from Control-C or if the script exits normally. However if you hit Control-C it will run twice. How can I fix this?</p>