pub fn find_service_processes(
owned: &[RecordedPid],
sweep: ServiceSweep,
) -> Vec<ServiceProcess>Expand description
Of the recorded owned PIDs (daemon PID file, proxy /health on this
instance’s port, Cockpit launch record), the ones that still are lean-ctx
background services sweep includes. Command line, executable, user and
identity (the recorded one, where the record has it) gate every PID
again, so a stale record whose PID now belongs to an MCP server, a command
runner or a foreign process is never selected. Never this process or its
ancestors, never a process whose identity cannot be read.