8000 gh-120635: Avoid leaking processes in test_pyrepl (#120676) · python/cpython@0f3e364 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f3e364

Browse files
authored
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.
1 parent d8f27cb commit 0f3e364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,5 +890,5 @@ def run_repl(self, repl_input: str | list[str], env: dict | None = None) -> tupl
890890
exit_code = process.wait(timeout=SHORT_TIMEOUT)
891891
except subprocess.TimeoutExpired:
892892
process.kill()
893-
exit_code = process.returncode
893+
exit_code = process.wait()
894894
return "\n".join(output), exit_code

0 commit comments

Comments
 (0)
0