How can I cause a child process to exit when the parent does?

后端 未结 9 2020
一生所求
一生所求 2020-11-27 16:07

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

9条回答
  •  悲&欢浪女
    2020-11-27 16:48

    For a single child processes you can manage this by inverting the child/parent relationship. See my answer to a later incarnation of this question.

提交回复
热议问题