mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user