mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
[3.13] gh-120635: Avoid leaking processes in test_pyrepl (GH-120676) (#120741)
gh-120635: Avoid leaking processes in test_pyrepl (GH-120676)
If the child process takes longer than SHORT_TIMEOUT seconds to
complete, kill the process but then wait until it completes with no
timeout to not leak child processes.
(cherry picked from commit 0f3e36454d
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
4ce1246a99
commit
bb5d19440b
1 changed files with 1 additions and 1 deletions
|
@ -890,5 +890,5 @@ class TestMain(TestCase):
|
|||
exit_code = process.wait(timeout=SHORT_TIMEOUT)
|
||||
except subprocess.TimeoutExpired:
|
||||
process.kill()
|
||||
exit_code = process.returncode
|
||||
exit_code = process.wait()
|
||||
return "\n".join(output), exit_code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue