mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-120635: Avoid leaking processes in test_pyrepl (#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.
This commit is contained in:
parent
d8f27cb114
commit
0f3e36454d
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