xilinx.py 文件源码

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

项目:ipbb 作者: ipbus 项目源码 文件源码
def on_parent_exit(signame):
    """
    Return a function to be run in a child process which will trigger
    SIGNAME to be sent when the parent process dies
    """
    signum = getattr(signal, signame)

    def set_parent_exit_signal():
        # http://linux.die.net/man/2/prctl
        result = cdll['libc.so.6'].prctl(PR_SET_PDEATHSIG, signum)
        if result != 0:
            raise PrCtlError('prctl failed with error code %s' % result)
    return set_parent_exit_signal
# ------------------------------------------------


# ------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号