[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 0f3e36454d754026d6c510053ff1e4b22ae80cd9)

Co-authored-by: Victor Stinner <vstinner@python.org>
1 file changed