mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
Handle process exit race in replay parent-death test
This commit is contained in:
@@ -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
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "57bf4bf680d75776c53c5e64a459500d3743fd8c850d14e89bd9ab2f432d5f0c", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "07631e15846ec760078cbd8770e278e5959470f90b429cccdd846a79002fe059", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user