parentpoller.py 文件源码

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

项目:qudi 作者: Ulm-IQO 项目源码 文件源码
def run(self):
        """ Run the parentpoller.
        """
        # We cannot use os.waitpid because it works only for child processes.
        from errno import EINTR
        while True:
            try:
                if os.getppid() == 1:
                    if hasattr(self.quitfunction, '__call__'):
                        self.quitfunction()
                    waitForClose()
                    os._exit(1)
                time.sleep(1.0)
            except OSError as e:
                if e.errno == EINTR:
                    continue
                raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号