how to kill (or avoid) zombie processes with subprocess module

后端 未结 9 1193
悲&欢浪女
悲&欢浪女 2020-11-29 22:10

When I kick off a python script from within another python script using the subprocess module, a zombie process is created when the subprocess \"completes\". I am unable to

9条回答
  •  攒了一身酷
    2020-11-29 22:56

    The python runtime takes responsibility for getting rid of zombie process once their process objects have been garbage collected. If you see the zombie lying around it means you have kept a process object and not called wait, poll or terminate on it.

提交回复
热议问题