pub fn spawn_daemon_with_env_policy(
command: &mut Command,
policy: EnvironmentPolicy,
) -> Result<DaemonChild>Expand description
Spawn a detached daemon using an explicit environment policy.
EnvironmentPolicy::Auto resolves to
EnvironmentPolicy::UserBaseline for daemons, excluding unlisted
ambient variables. Use EnvironmentPolicy::Inherit as the explicit
escape hatch for trusted callers that require the full parent environment.
In every mode, explicit command environment additions, overrides, and
removals are applied last.