Skip to content

Commit 8659ded

Browse files
[3.14] gh-161609: Catch ProcessLookupError on os.getsid() in regrtest (GH-161610) (#161614)
gh-161609: Catch ProcessLookupError on os.getsid() in regrtest (GH-161610) (cherry picked from commit 3ad9ded) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent aee9046 commit 8659ded

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Lib/test/libregrtest/run_workers.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ def _kill(self) -> None:
153153
# On OpenBSD getsid() is only allowed for a process in the
154154
# same session, so the failure means that it is not.
155155
use_killpg = True
156+
except ProcessLookupError:
157+
# The process completed in the meanwhile
158+
return
156159

157160
if use_killpg:
158161
what = f"{self} process group"

0 commit comments

Comments
 (0)