title: Why SIGINT can stop bash in terminal but not via kill -INT?
body: <p>I noticed that when I am running a hanging process via bash script like this</p>
  
  <p>foo.sh:</p>
  
  <pre><code>sleep 999
  </code></pre>
  
  <p>If I run it via command, and press Ctrl+C</p>
  
  <pre><code>./foo.sh
  ^C
  </code></pre>
  
  <p>The sleep will be interrupted. However, when I try to kill it with SIGINT</p>
  
  <pre><code>ps aux | grep foo
  kill -INT 12345  # the /bin/bash ./foo.sh process
  </code></pre>
  
  <p>Then it looks like bash and sleep ignores the SIGINT and keep running. This surprises me. I thought Ctrl + C is actually sending SIGINT to the foreground process, so why is that behaviors differently for Ctrl + C in terminal and kill -INT?</p>