title: Why child process still alive after parent process was killed in Linux?
body: <p>Someone told me that when you killed a parent process in linux, the child would die.<br>
  But I doubt it. So I wrote two bash scripts, where <code>father.sh</code>would invoke <code>child.sh</code></p>
  
  <p>Here is my script: </p>
  
  <p><img src="https://i.stack.imgur.com/ahthV.jpg" alt="enter image description here"></p>
  
  <p>Now I run <code>bash father.sh</code>, you could check it <code>ps -alf</code>
  <img src="https://i.stack.imgur.com/xbciR.jpg" alt="enter image description here"></p>
  
  <p>Then I killed the <code>father.sh</code> by <code>kill -9 24588</code>, and I guessed the child process should be terminated but unfortunately I was wrong.
  <img src="https://i.stack.imgur.com/E8xwO.jpg" alt="enter image description here"></p>
  
  <p>Could anyone explain why? </p>
  
  <p>thx</p>