[Fix] (CI): treat a process that exits mid-read of its /proc stat as gone in the TCP server fixture

This commit is contained in:
2026-10-14 18:59:27 -04:00
parent d1b3a3325f
commit fdb93e9e65
+2 -1
View File
@@ -16,7 +16,8 @@ from urllib.parse import urlsplit
def process_start(pid):
try:
return Path(f'/proc/{pid}/stat').read_text().rsplit(')', 1)[1].split()[19]
except FileNotFoundError:
except (FileNotFoundError, ProcessLookupError):
# ESRCH: the process exited between opening its stat file and reading it.
return None