title: Kill a process group
body: <p>I have a process tree as P1 ⟶ P2 ⟶ P3 ⟶ P4 ⟶ P5 (so P2 is child for P1 and P3 is child for P2 and so on).</p>
  
  <ul>
  <li>Process P1 and P2 belong to same process group.</li>
  <li>Process P3 and P4 and P5 belong to other process group.</li>
  </ul>
  
  <p>In process P1, we know the process group of P3, P4 and P5 (it is the value P3) and we are sending the SIGKILL to this process group. using <code>kill(-P3, SIGKILL)</code>.
  The expectation is this will kill P3, P4 and P5 but not P2 but the observation is that P2
  also got killed.
  I have a two questions here:</p>
  
  <ol>
  <li>Why is P2 getting killed?</li>
  <li>What would be the exit status of P2 we will be getting in P1.</li>
  </ol>