Skip to main content

launch_on_calling_thread

Function launch_on_calling_thread 

Source
pub fn launch_on_calling_thread()
Expand description

Makes every later launch in this process run its ptrace session on the calling thread, as launches did before the tracer thread, and leaves the caller’s stack to the caller. For a process that must not gain threads: the hermit CLI runs its launch inside a container child made with a raw clone, whose entry point ends with a thread exit, so a tracer thread still waiting for work would keep that child alive. The CLI launches from its main thread or from the child’s own stack, which have room.