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
评论列表
文章目录