pub fn leads_own_group(pid: u32) -> bool
True when pid is the leader of its own process group, so kill(-pid) reaches its group and nothing else (never the caller’s own group, whose leader is someone else).
pid
kill(-pid)