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.
Is there any way to "tie" the child process to the parent, such that it'll exit when the parent is killed?
Similar questions: