_signals_windows.py 文件源码

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

项目:py_daemoniker 作者: Muterra 项目源码 文件源码
def _await_signal(process):
    ''' Waits for the process to die, and then returns the exit code for
    the process, converting CTRL_C_EVENT and CTRL_BREAK_EVENT into
    SIGINT.
    '''
    # Note that this is implemented with a busy wait
    process.wait()
    code = process.returncode

    if code == signal.CTRL_C_EVENT:
        code = signal.SIGINT
    elif code == signal.CTRL_BREAK_EVENT:
        code = signal.SIGINT

    return code
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号