MCPcopy Index your code
hub / github.com/python/cpython / __del__

Method __del__

Lib/subprocess.py:1185–1198  ·  view source on GitHub ↗
(self, _maxsize=sys.maxsize, _warn=warnings.warn)

Source from the content-addressed store, hash-verified

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'):

Callers

nothing calls this directly

Calls 3

_internal_pollMethod · 0.95
_warnFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected