Skip to main content

configure

Function configure 

Source
pub fn configure(
    spec: Option<&str>,
    memory_max: Option<&str>,
    pids_max: Option<&str>,
) -> Option<Configured>
Expand description

Resolve + probe the --cgroup spec ONCE at startup, arming per-run child cgroups. spec is "auto" (derive <own-cgroup>/agentd from /proc/self/cgroup) or an absolute path under /sys/fs/cgroup. Optional memory_max/pids_max specs request hard limits on each run’s leaf; this best-effort delegates the controllers to the parent so the limits can take effect. Returns None when off / not writable (the feature stays dormant). Idempotent — the first call wins.