]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-130080: return in finally in subprocess.py (#130081)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Sun, 16 Feb 2025 13:52:04 +0000 (13:52 +0000)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2025 13:52:04 +0000 (13:52 +0000)
Lib/subprocess.py

index 2044d2a42897e92c5da65079c4a31516d6536960..1948ac8a3a1dfe37ac7eff98d3dbb808755d7107 100644 (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: