Make the API to run background processes more powerful

Supports death notification and can redirect stdout/stderr to an fd
This commit is contained in:
Kovid Goyal
2024-05-14 13:11:04 +05:30
parent 78416acd16
commit 8eb3267fb8
2 changed files with 57 additions and 22 deletions

View File

@@ -116,7 +116,7 @@ def update_check() -> bool:
kitty_exe(), '+runpy',
'from kitty.update_check import run_worker; run_worker()'
], stdout=subprocess.PIPE, preexec_fn=clear_handled_signals)
except OSError as e:
except Exception as e:
log_error(f'Failed to run kitty for update check, with error: {e}')
return False
monitor_pid(p.pid)