title: How do I automatically destroy child processes in Windows?
body: <p>In C++ Windows app, I launch several long running child processes (currently I use CreateProcess(...) to do this. </p>
  
  <p>I want the child processes to be automatically closed <strong>if my main processes crashes</strong> or is closed.</p>
  
  <p>Because of the requirement that this needs to work for a crash of the "parent", I believe this would need to be done using some API/feature of the operating system. So that all the "child" processes are cleaned up.</p>
  
  <p>How do I do this?</p>