(self, sig, on_error=None)
| 207 | return self.send(0) |
| 208 | |
| 209 | def send(self, sig, on_error=None): |
| 210 | pid = self.pid |
| 211 | if pid: |
| 212 | try: |
| 213 | os.kill(pid, sig) |
| 214 | except OSError as exc: |
| 215 | if exc.errno not in (errno.ESRCH, errno.EPERM): |
| 216 | raise |
| 217 | # ESRCH: pid is gone. EPERM: the pid was recycled by |
| 218 | # the OS and now belongs to another user's process. |
| 219 | # Either way, treat it as this node no longer being alive. |
| 220 | maybe_call(on_error, self) |
| 221 | return False |
| 222 | return True |
| 223 | maybe_call(on_error, self) |
| 224 | |
| 225 | def start(self, env=None, **kwargs): |
| 226 | return self._waitexec( |
no test coverage detected