title: How can I cause a child process to exit when the parent does?
body: <p>I am launching a child process with ProcessBuilder, and need the child process to exit if the parent process does.  Under normal circumstances, my code is stopping the child properly.  However, if I cause the OS to kill the parent, the child will continue running.</p>
  
  <p>Is there any way to "tie" the child process to the parent, such that it'll exit when the parent is killed?</p>
  
  <hr>
  
  <p>Similar questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/284325/how-to-make-child-process-die-after-parent-exits">How to make child process die after parent exits?</a></li>
  <li><a href="https://stackoverflow.com/questions/395877/are-child-processes-created-with-fork-automatically-killed-when-the-parent-is-k">Are child processes created with fork() automatically killed when the parent is killed?</a></li>
  </ul>