title: Linux - how does the kill -k switch work in timeout command
body: <p>I have two one liners:</p>
  
  <p>In first. I've expected killing <code>sh -c "..."</code> command after 5 seconds but it exists until the timeout exits (for 10 seconds)</p>
  
  <pre><code>timeout -k 5s 10s sh -c 'sleep 20s &amp;&amp; echo "Long running command which is visible under: ps -elf | grep sleep during whole life (10s) time of timeout command"'
  </code></pre>
  
  <p>In second. I've expected that timeout will exit with return code 124 (because the <code>sh -c "..."</code> command is still running) while the command <code>sh -c "..."</code> will continue to run (because of kill option for timeout was not set)</p>
  
  <pre><code>timeout 10s sh -c 'sleep 20s &amp;&amp; echo "Long running command which is visible under: ps -elf | grep sleep during whole life (10s) time of timeout command"'
  </code></pre>
  
  <p>It seems that argument passed to timeout runs for exact time as timeout command itself (it is not killed earlier nor survive timeout) what is the purpose of kill option then?</p>