def kill_children():
"""
Kill child process
"""
for proc in multiprocessing.active_children():
LOG.info('Terminating %r [%d] ...', proc, proc.pid)
proc.terminate()
parent = psutil.Process(os.getpid())
for child in parent.children(recursive=True):
LOG.info('Terminating process %r', child)
child.kill()
评论列表
文章目录