types.py 文件源码

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

项目:correct_shit_f 作者: PrieureDeSion 项目源码 文件源码
def _wait_output(popen):
        """Returns `True` if we can get output of the command in the
        `settings.wait_command` time.

        Command will be killed if it wasn't finished in the time.

        :type popen: Popen
        :rtype: bool

        """
        proc = Process(popen.pid)
        try:
            proc.wait(settings.wait_command)
            return True
        except TimeoutExpired:
            for child in proc.children(recursive=True):
                child.kill()
            proc.kill()
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号