Skip to main content

live_background_pids

Function live_background_pids 

Source
pub fn live_background_pids(tasks: &[BackgroundTaskEntry]) -> Vec<u32>
Expand description

The PIDs of tasks that are still that task (spec §8, PID reuse).

A process that was already running when bashwrap last saw the task running IS the task’s process: the OS can’t reuse a PID while its owner is alive. So the test is “started no later than last_seen_ms”, which also holds for a task that started long after it was declared (a tool call waiting on a permission prompt). A reused PID started after the task was last seen, and is left alone.