On 8/17/26 07:32, SCOTT FIELDS wrote: > For anyone interested: > > https://github.com/systemd/systemd/pull/1116 > > "This moves PID 1 into a new "init.scope" implicit scope unit in the root > slice. This is necessary since on the unified hierarchy cgroups may > either contain subgroups or processes but not both. PID 1 hence has to > move out of the root cgroup (strictly speaking the root cgroup is the > only one where processes and subgroups are still allowed, but in order > to support containers nicey, we move PID 1 into the new scope in all > cases.) This new unit is also used on legacy hierarchy setups. It's > actually pretty useful on all systems, as it can then be used to filter > journal messages coming from PID 1, and so on."
Oh, that explains why PID 1 is not just left in the root cgroup. I missed the container use-case. The project I am working on will never run in a container so that is not a concern. > On Mi, 29.07.26 16:13, Demi Marie Obenour ([email protected]) wrote: > >> What is the purpose of having PID 1 in init.scope? Is it functionally >> necessary, or is it solely for consistency with when systemd is >> running in a container or as a user service manager? > > PID 1 needs to live somehwere, so that's where we put it. Where else > would you put it? > > Lennart -- Sincerely, Demi Marie Obenour (she/her/hers)
OpenPGP_signature.asc
Description: OpenPGP digital signature
