linux.py 文件源码

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

项目:vivisect-py3 作者: bat-serjo 项目源码 文件源码
def platformWait(self):
        # Blocking wait once...
        pid, status = os.waitpid(-1, 0x40000002)
        self.setMeta("ThreadId", pid)
        # Stop the rest of the threads... 
        # why is linux debugging so Ghetto?!?!
        if not self.stepping:  # If we're stepping, only do the one
            for tid in self.pthreads:
                if tid == pid:
                    continue
                try:
                    # We use SIGSTOP here because they can't mask it.
                    os.kill(tid, signal.SIGSTOP)
                    os.waitpid(tid, 0x40000002)
                except Exception as e:
                    print("WARNING TID is invalid %d %s" % (tid, e))
        return pid, status
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号