Killing the children with the parent

后端 未结 7 1534
孤城傲影
孤城傲影 2020-12-08 11:36

I have a program spawning and communicating with CPU heavy, unstable processes, not created by me. If my app crashes or is killed by SIGKILL, I want the subproc

7条回答
  •  感动是毒
    2020-12-08 12:13

    I thought the double fork was to detach from a controlling terminal. I'm not sure how you are trying to use it.

    It's a hack, but you could always call 'ps' and search for the process name your trying to kill.

提交回复
热议问题