title: process kill notification in linux
body: <p>Hello I have two process in Linux say P1 &amp; P2 and both are separate executable. 
  In process "P1" I'm using "system()" function to run process "P2". 
  Process "P2" runs for 6 seconds and it calls "exit()" API ( It kills itself).</p>
  
  <p>I want to know how I can get process "P2" kill notification in Process "P1"?</p>