wrapping.py 文件源码

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

项目:FLASH 作者: yuyuz 项目源码 文件源码
def get_all_p_for_pgid():
    current_pgid = os.getpgid(os.getpid())
    running_pid = []
    for pid in psutil.process_iter():
        try:
            pgid = os.getpgid(pid)
        except:
            continue

        # Don't try to kill HPOlib-run
        if pgid == current_pgid and pid != os.getpid():
            # This solves the problem that a Zombie process counts
            # towards the number of process which have to be killed
            running_pid.append(pid)
    return running_pid
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号