diff options
author | Victor Stinner <vstinner@python.org> | 2019-10-16 22:29:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 22:29:12 (GMT) |
commit | a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be (patch) | |
tree | f5686760852e658e82eda135817ad65b4359ed84 /Lib/test/libregrtest | |
parent | 7aebbd1182bc818324656b2fb764679faf51fdff (diff) | |
download | cpython-a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be.zip cpython-a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be.tar.gz cpython-a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be.tar.bz2 |
bpo-37531: regrtest now catchs ProcessLookupError (GH-16827)
Fix a warning on a race condition on TestWorkerProcess.kill(): ignore
silently ProcessLookupError rather than logging an useless warning.
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r-- | Lib/test/libregrtest/runtest_mp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 71db8d6..8026de1 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -152,6 +152,11 @@ class TestWorkerProcess(threading.Thread): print(f"Kill {self}", file=sys.stderr, flush=True) try: popen.kill() + except ProcessLookupError: + # Process completed, the TestWorkerProcess thread read its exit + # status, but Popen.send_signal() read the returncode just before + # Popen.wait() set returncode. + pass except OSError as exc: print_warning(f"Failed to kill {self}: {exc!r}") |