io_helpers.py 文件源码

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

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def __terminate(self,pid):
        sp = self._processes[pid]
        for sig, timeout in self._STOP_SIGNALS:
            try:
                # the group id is used to handle child processes (if they
                # exist) of the component being cleaned up
                if _domainless._DEBUG == True:
                    print "_OutputBase: __terminate () making killpg call on pid " + str(pid) + " with signal " + str(sig)
                _os.killpg(pid, sig)
            except OSError:
                log.error("_OutputBase: __terminate() OSERROR ===============")
                pass
            if timeout != None:
                giveup_time = _time.time() + timeout
            while sp.poll() == None:
                if _time.time() > giveup_time: break
                _time.sleep(0.1)
            if sp.poll() != None: break
        sp.wait()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号