CreateProcess such that child process is killed when parent is killed?

前端 未结 6 977
夕颜
夕颜 2020-12-31 03:55

Is there a way to call CreateProcess such that killing the parent process automatically kills the child process?

Perhaps using Create Process Flags?

Edit<

6条回答
  •  余生分开走
    2020-12-31 04:47

    The best you can do is to put both processes in the same job, so that killing the job kills both processes.

提交回复
热议问题