(self, timeout)
| 30 | self.handle(listener, client, addr) |
| 31 | |
| 32 | def wait(self, timeout): |
| 33 | try: |
| 34 | self.notify() |
| 35 | ret = select.select(self.wait_fds, [], [], timeout) |
| 36 | if ret[0]: |
| 37 | if self.PIPE[0] in ret[0]: |
| 38 | os.read(self.PIPE[0], 1) |
| 39 | return ret[0] |
| 40 | |
| 41 | except OSError as e: |
| 42 | if e.args[0] == errno.EINTR: |
| 43 | return self.sockets |
| 44 | if e.args[0] == errno.EBADF: |
| 45 | if self.nr < 0: |
| 46 | return self.sockets |
| 47 | else: |
| 48 | raise StopWaiting |
| 49 | raise |
| 50 | |
| 51 | def is_parent_alive(self): |
| 52 | # If our parent changed then we shut down. |