ci(molecule): isolate Molecule runs per run and stop running Molecule on push to main #350
@@ -353,7 +353,7 @@ def alive(pid):
|
||||
"""Whether pid is a running process, not gone or a zombie."""
|
||||
try:
|
||||
stat = pathlib.Path(f"/proc/{pid}/stat").read_text()
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, ProcessLookupError): # gone before or during the read
|
||||
return False
|
||||
return stat.rsplit(")", 1)[1].split()[0] != "Z"
|
||||
|
||||
|
||||
Reference in new issue
Block a user