gh-130080: return in finally in subprocess.py (#130081)

This commit is contained in:
Irit Katriel 2025-02-16 13:52:04 +00:00 committed by GitHub
parent 73d03005b0
commit 56495f81fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1123,10 +1123,9 @@ class Popen:
except TimeoutExpired:
pass
self._sigint_wait_secs = 0 # Note that this has been done.
return # resume the KeyboardInterrupt
# Wait for the process to terminate, to avoid zombies.
self.wait()
else:
# Wait for the process to terminate, to avoid zombies.
self.wait()
def __del__(self, _maxsize=sys.maxsize, _warn=warnings.warn):
if not self._child_created: