Skip to main content

become_subreaper

Function become_subreaper 

Source
fn become_subreaper()
Expand description

Makes the supervisor the parent of every orphan among its descendants.

Without ptrace the supervisor reads and writes tracee memory on its own authority, which Yama’s default ptrace_scope of 1 grants only towards descendants. A daemon that double-forks would be reparented to init and lose that standing; as a child subreaper the supervisor adopts it instead, and wait_root reaps it.