proc.py 文件源码

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

项目:pwndemo 作者: zh-explorer 项目源码 文件源码
def ancestors(pid):
    """ancestors(pid) -> int list

    Arguments:
        pid (int): PID of the process.

    Returns:
        List of PIDs of whose parent process is `pid` or an ancestor of `pid`.
    """
    pids = []
    while pid != 0:
         pids.append(pid)
         pid = parent(pid)
    return pids
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号