bioqueue.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:BioQueue 作者: liyao001 项目源码 文件源码
def kill_proc(proc):
    """
    Kill a process and its children processes
    :param proc: Process class defined in psutil
    :return: None
    """
    try:
        children = proc.children()
        for child in children:
            try:
                child.terminate()
            except:
                pass
        gone, still_alive = psutil.wait_procs(children, timeout=3)
        for p in still_alive:
            p.kill()
        proc.kill()
    except:
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号