Re: [systemd-devel] Purpose of init.scope
Demi Marie Obenour <[email protected]>
| Newsgroups | org.kernel.vger.cgroups |
|---|---|
| Message-ID | <[email protected]> |
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
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEopQtqVJW1aeuo9/sszaHOrMp8lMFAmqEnh8ACgkQszaHOrMp 8lMEUBAAgwB1AXgKbOgHubj8pVWQH4uP+n+WLSRRyUhCsmZDiVjD/5m97TxTv/ZJ QLzlViSL3j1GXpqT/ynZjLCWkkGZdoiybILIEiCh1BlkMqbTpr5Xan6UA38mc3q8 8J2wBB3c5bXneSmLrTktd0CrifODmFoDOFEfRxnkEZyvfuC4J2L+aYCVXJXfnqJB zoA8EUErZpMPoyykrqkP8zlwSMCUcIL2VozE6rSV+07TddHgOQTZRrZ9Il/BWm1D o5w5nUU4pvaCp1YI7SOS0yG/afp8YPAQw4vBYrsQBJ+CN3N+lgZ/dEDBGd/UAu1v C4256iBzJazzqFSYtkKZuSXxDgIA927dtitU+G9X1QwTLQzBzgKtgoo5063lwlmV PRSl8jrRr5TbY6DGlrP0M/hg5i71Z8Ul5mTvoH5ixhk56WlHwjwrRopMI4k/tZEm naEYSbalcMt1cmyCSI4/FGFpmVs/oND1yqhCXeKY5bkAyKaUEcQKBrohi/a2GOTW 7O7821RPxfQXCTTi8sywARvGTDhfmAYhgkk+RMiuJ/WGrf9xhAoB4ND9nQJvUZu/ ubY5SsKkGuY9pGp/ezg9EUB+isO2OgnLjJxmQVWK36EOQHjInA6rDLiLFH+GA2oz rg/gfcvEKe2XBSAUiWkFQY1l+oiwrm/oHiCRm1FPFKFJEorBoKE= =Ic6I -----END PGP SIGNATURE-----