(self, _maxsize=sys.maxsize, _warn=warnings.warn)
| 1129 | self.wait() |
| 1130 | |
| 1131 | def __del__(self, _maxsize=sys.maxsize, _warn=warnings.warn): |
| 1132 | if not self._child_created: |
| 1133 | # We didn't get to successfully create a child process. |
| 1134 | return |
| 1135 | if self.returncode is None: |
| 1136 | # Not reading subprocess exit status creates a zombie process which |
| 1137 | # is only destroyed at the parent python process exit |
| 1138 | _warn("subprocess %s is still running" % self.pid, |
| 1139 | ResourceWarning, source=self) |
| 1140 | # In case the child hasn't been waited on, check if it's done. |
| 1141 | self._internal_poll(_deadstate=_maxsize) |
| 1142 | if self.returncode is None and _active is not None: |
| 1143 | # Child is still running, keep us alive until we can wait on it. |
| 1144 | _active.append(self) |
| 1145 | |
| 1146 | def _get_devnull(self): |
| 1147 | if not hasattr(self, '_devnull'): |
nothing calls this directly
no test coverage detected