updatableProcess.py 文件源码

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

项目:wifimitm 作者: mvondracek 项目源码 文件源码
def stop(self):
        """
        Stop process if it's running.
        """
        if self.cleaned:
            raise ValueError("Can't call stop on process after cleanup was performed.")
        if self.poll() is None:
            # process is running
            self.terminate()
            try:
                logger.debug('Waiting for {} process to terminate.'.format(type(self).__name__))
                self.wait(timeout=10)
            except subprocess.TimeoutExpired:
                self.kill()
                logger.warning('Process {} killed after unsuccessful termination.'.format(type(self).__name__))
            else:
                logger.debug('Process {} terminated.'.format(type(self).__name__))

        self.update()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号