MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __del__

Method __del__

tools/python-3.11.9-amd64/Lib/subprocess.py:1120–1133  ·  view source on GitHub ↗
(self, _maxsize=sys.maxsize, _warn=warnings.warn)

Source from the content-addressed store, hash-verified

1118 self.wait()
1119
1120 def __del__(self, _maxsize=sys.maxsize, _warn=warnings.warn):
1121 if not self._child_created:
1122 # We didn't get to successfully create a child process.
1123 return
1124 if self.returncode is None:
1125 # Not reading subprocess exit status creates a zombie process which
1126 # is only destroyed at the parent python process exit
1127 _warn("subprocess %s is still running" % self.pid,
1128 ResourceWarning, source=self)
1129 # In case the child hasn't been waited on, check if it's done.
1130 self._internal_poll(_deadstate=_maxsize)
1131 if self.returncode is None and _active is not None:
1132 # Child is still running, keep us alive until we can wait on it.
1133 _active.append(self)
1134
1135 def _get_devnull(self):
1136 if not hasattr(self, '_devnull'):

Callers

nothing calls this directly

Calls 3

_internal_pollMethod · 0.95
_warnFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected