(self, _maxsize=sys.maxsize, _warn=warnings.warn)
| 1183 | self.wait() |
| 1184 | |
| 1185 | def __del__(self, _maxsize=sys.maxsize, _warn=warnings.warn): |
| 1186 | if not self._child_created: |
| 1187 | # We didn't get to successfully create a child process. |
| 1188 | return |
| 1189 | if self.returncode is None: |
| 1190 | # Not reading subprocess exit status creates a zombie process which |
| 1191 | # is only destroyed at the parent python process exit |
| 1192 | _warn("subprocess %s is still running" % self.pid, |
| 1193 | ResourceWarning, source=self) |
| 1194 | # In case the child hasn't been waited on, check if it's done. |
| 1195 | self._internal_poll(_deadstate=_maxsize) |
| 1196 | if self.returncode is None and _active is not None: |
| 1197 | # Child is still running, keep us alive until we can wait on it. |
| 1198 | _active.append(self) |
| 1199 | |
| 1200 | def _get_devnull(self): |
| 1201 | if not hasattr(self, '_devnull'): |
nothing calls this directly
no test coverage detected