[][src]Function capctl::prctl::set_subreaper

pub fn set_subreaper(flag: bool) -> Result<()>

Set the "child subreaper" flag for the current process.

If a process dies, its children will be reparented to the nearest surviving ancestor subreaper, or to PID 1 if it has no ancestor subreapers.

This is useful for process managers that need to be informed when any of their descendants (possibly processes that used the double-fork() trick to become daemons) die.