[systemd-devel] unable to attach pid to service delegated directory in unified mode after restart

Lennart Poettering lennart at poettering.net
Wed Mar 16 16:57:11 UTC 2022


On Mi, 16.03.22 17:35, Michal Koutný (mkoutny at suse.com) wrote:

> True, in the unified mode it should be safe doing manually.
> I was worried about migrating e.g. MainPID of a service into this scope
> but PID1 should handle that AFAICS. Also since this has to be performed
> by the privileged user (scopes are root's), the manual migration works.

This is actually a common case: for getty style login process the main
process of the getty service will migrate to the new scope. A service
is thus always a cgroup *and* a main pid for us, in case the main pid
is outside of the cgroup. And conversely, a process can be associated
to multiple units this way. It can be main pid of one service and be
in a cgroup of a scope.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list