title: CreateProcess such that child process is killed when parent is killed?
body: <p>Is there a way to call <a href="http://msdn.microsoft.com/en-us/library/ms682425%28v=vs.85%29.aspx" rel="noreferrer">CreateProcess</a> such that killing the parent process automatically kills the child process?</p>
  
  <p>Perhaps using <a href="http://msdn.microsoft.com/en-us/library/ms684863%28v=vs.85%29.aspx" rel="noreferrer">Create Process Flags</a>?</p>
  
  <p><b>Edit</b><br>
  The solution is to create a job object, place both parent and child in the job object.  Whent he parent is killed the child is killed.  I got the code from here:
  <a href="https://stackoverflow.com/questions/3342941/kill-child-process-when-parent-process-is-killed">Kill child process when parent process is killed</a>
  Take note of @wilx's comment about inherited handles.</p>