Handle process exit race in replay parent-death test

This commit is contained in:
Dom
2026-10-16 08:23:02 -05:00
parent 40e0f1f2a9
commit eb151c76b1
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -394,7 +394,11 @@ time.sleep(30)
deadline = time.monotonic() + 3
while time.monotonic() < deadline:
path = Path(f"/proc/{child}/stat")
if not path.exists() or path.read_text().split()[2] == "Z":
try:
state = path.read_text().split()[2]
except (FileNotFoundError, ProcessLookupError):
break
if state == "Z":
break
time.sleep(.02)
else:
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "57bf4bf680d75776c53c5e64a459500d3743fd8c850d14e89bd9ab2f432d5f0c", "schema_version": 1}
{"protected_inventory_sha256": "07631e15846ec760078cbd8770e278e5959470f90b429cccdd846a79002fe059", "schema_version": 1}