Check that the pipe has not been closed by sending a probe.
(self)
| 253 | self._write(msg) |
| 254 | |
| 255 | def _check_alive(self): |
| 256 | '''Check that the pipe has not been closed by sending a probe.''' |
| 257 | try: |
| 258 | # We cannot use send here as it calls ensure_running, creating |
| 259 | # a cycle. |
| 260 | os.write(self._fd, self._make_probe_message()) |
| 261 | except OSError: |
| 262 | return False |
| 263 | else: |
| 264 | return True |
| 265 | |
| 266 | def register(self, name, rtype): |
| 267 | '''Register name of resource with resource tracker.''' |