title: Linux: get the exit code from the kill command
body: <p>If I send a <code>SIGTERM</code> signal to a process using the <code>kill</code> command, I expect an exit code, but I always get 0 (zero) when running the below command after killing a process:</p>
  
  <pre><code>echo $?
  </code></pre>
  
  <p>According to the answer in this post, I should get 143 when sending a <code>SIGTERM</code> to a process: <a href="https://stackoverflow.com/questions/4192364/always-app-java-end-with-exit-143-ubuntu">Always app Java end with &quot;Exit 143&quot; Ubuntu</a></p>
  
  <p>But I don´t get that exit code. Why?</p>