From eb15cc089418d1870d157257398c963818c81bc9 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Mon, 6 Apr 2026 18:44:56 -0500 Subject: [PATCH] fix: remove PR_SET_PDEATHSIG that kills Chrome after ~10s idle (#1157) (#1173) v0.24.1 introduced `prctl(PR_SET_PDEATHSIG, SIGKILL)` in #1137 to kill Chrome when the daemon dies. However, `PR_SET_PDEATHSIG` tracks the **thread** that called `fork()`, not the process (`prctl(2)` documents this). Chrome is spawned via `tokio::task::spawn_blocking`, whose threads are reaped after ~10 seconds of idle time. When the blocking thread exits, the kernel sends SIGKILL to Chrome even though the daemon is still alive. Symptoms reported in #1157: - `tab list` shows `about:blank` after a few seconds - `snapshot` returns an empty page - All Chrome processes exit ~9 seconds after launch - Any workflow involving navigation or waiting breaks The fix removes `PR_SET_PDEATHSIG` from the Chrome `pre_exec` hook. Orphan cleanup is already handled by the process-group kill (`kill(-pgid, SIGKILL)`) in `ChromeProcess::kill()`, which runs via daemon signal handlers, `close_notify`, idle timeout, and `Drop`. Fixes #1157 --- cli/src/native/cdp/chrome.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/cli/src/native/cdp/chrome.rs b/cli/src/native/cdp/chrome.rs index 9236e0f..d39d80a 100644 --- a/cli/src/native/cdp/chrome.rs +++ b/cli/src/native/cdp/chrome.rs @@ -351,23 +351,18 @@ fn try_launch_chrome(chrome_path: &Path, options: &LaunchOptions) -> Result