Expand description
systemd KillMode=control-group detection (#391, part of #354).
When the daemon runs inside a systemd unit whose KillMode is
control-group (systemd’s default), stopping the unit kills every
process in the unit’s cgroup — including spawned children the daemon
expected to outlive it. At startup the daemon probes for this and emits
a WARN; broker doctor surfaces the same assessment.
The decision logic (assess) is a pure function over
SystemdProbeInputs so it is testable on every platform with
simulated environments. Only probe’s input gathering is
Linux-specific; on other platforms it reports KillModeAssessment::NotSystemd.
Structs§
- Systemd
Probe Inputs - Inputs to the KillMode assessment, gathered by
probeor injected by tests.
Enums§
- Kill
Mode Assessment - Result of the KillMode assessment.
Functions§
- assess
- Pure KillMode assessment over injected inputs.
- parse_
kill_ mode - Extract the KillMode value from
systemctl show -p KillMode <unit>output (KillMode=control-group), tolerating a bare--valueform. - probe
- Probe the live environment. Linux-only gathering; other platforms
always report
KillModeAssessment::NotSystemd. - unit_
from_ cgroup - Resolve the owning systemd unit name from
/proc/self/cgroupcontents.