def platformProcessEvent(self, event):
pid, status = event
if os.WIFEXITED(status):
tid = self.getMeta("ThreadId", -1)
exitcode = os.WEXITSTATUS(status)
if tid != self.getPid():
# Set the selected thread ID to the pid cause
# the old one's invalid
if tid in self.pthreads:
self.pthreads.remove(tid)
self.setMeta("ThreadId", self.getPid())
self._fireExitThread(tid, exitcode)
else:
self._fireExit(exitcode)
elif os.WIFSIGNALED(status):
self._fireExit(os.WTERMSIG(status))
elif os.WIFSTOPPED(status):
sig = os.WSTOPSIG(status)
self.handlePosixSignal(sig)
else:
print("OMG WTF JUST HAPPENED??!?11/!?1?>!")
评论列表
文章目录