Added debug information

This commit is contained in:
Anton Hvornum 2022-02-12 15:04:26 +01:00
parent bcc8aa0477
commit a345d50923
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 1 additions and 0 deletions

View File

@ -530,6 +530,7 @@ def reboot():
def pid_exists(pid: int) -> bool:
print(f'Checking if pid {pid} exists.')
try:
return any(subprocess.check_output(['/usr/bin/ps', '--no-headers', '-o', 'pid', '-p', str(pid)]).strip())
except subprocess.CalledProcessError: