Skip to main content

apply

Function apply 

Source
pub unsafe fn apply(startup: Startup) -> &'static Resolved
Expand description

Resolve the full PATH, set it and the missing network variables for this process, and save the PATH when it is known good.

ยงSafety

Call this before the process starts any other thread: it changes the process environment with std::env::set_var. The login-shell capture starts one reader thread. It joins that thread before it returns, also after a timeout, once the killed process group has closed the pipe. When a descendant left the group and still holds the pipe, the reader can still run; apply then changes no variable at all, so no other thread can observe a change.