mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
also catch ProcessLookupError in is_zombie_process()
Summary: I saw an integration test failure because `eden shutdown` encountered a `ProcessLookupError`. This was thrown by the `proc_stat.read()` call. Update this function to also expect this exception type if the process has exited after we opened the file but before we could read it. Reviewed By: strager Differential Revision: D13521580 fbshipit-source-id: 027ad562024b5f05684e82cd940987eea2349077
This commit is contained in:
parent
9e21449bee
commit
1b49161fce
@ -88,7 +88,7 @@ def is_zombie_process(pid: int) -> bool:
|
||||
pieces = line.split()
|
||||
if len(pieces) > 2 and pieces[2] == b"Z":
|
||||
return True
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, ProcessLookupError):
|
||||
pass
|
||||
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user