Skip to main content

is_foreign_scope

Function is_foreign_scope 

Source
pub fn is_foreign_scope(dir: &Path) -> bool
Expand description

Whether dir may be treated as the kernel’s own scope: it is not this host process’s cgroup nor one of its ancestors. A kernel that was never moved into a scope of its own (a launcher that only execs, or the moment before systemd-run moves it) still sits in the host’s cgroup, and killing “every process in it” would kill the host and the terminal it runs in (on 2026-10-15 a test under a fake systemd-run killed the user’s Ghostty surface this way).