am_smi: increase kill retries (#11099)

This commit is contained in:
nimlgen 2025-07-05 16:23:50 +03:00 committed by GitHub
commit 4dccb2ea49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,8 +284,8 @@ if __name__ == "__main__":
while True:
try: pid = subprocess.check_output(['sudo', 'lsof', '-t', dev]).decode('utf-8').split('\n')[0]
except subprocess.CalledProcessError: break
if stopped_pids[pid] > 0: time.sleep(0.5)
if stopped_pids[pid] == 10:
if stopped_pids[pid] > 0: time.sleep(0.1)
if stopped_pids[pid] == 64:
print(f"{dev[8:-5]}: can't stop process {pid}, exitting")
exit(1)