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

前端 未结 6 934
夕颜
夕颜 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:35

    I suppose DEBUG_PROCESS or DEBUG_ONLY_THIS_PROCESS would do that as an almost-accidental side-effect. Windows doesn't create processes in a tree the way Unix-like systems do though.

提交回复
热议问题