[systemd-devel] Possible race condition for setting cgroup sticky bit

Lennart Poettering lennart at poettering.net
Tue Apr 9 08:11:09 PDT 2013


On Tue, 09.04.13 13:20, Anders Olofsson (anders.olofsson at axis.com) wrote:

> > Well, the systemd hiearchy is special. We have special semantics for it,
> > and you shouldn't alter it. You are free to rearrange cgroups in all
> > other hierarchies and drop as many services in the same cgroup as you
> > wish for those, but not for systemd's own name=systemd hierarchy.
> > 
> > I hope this makes sense,
> 
> Yes, thank you for your help.
> 
> A follow up question. Is there some other way to accomplish what we were trying to do here?
> 
> The reason for doing this the we have a remote shell (e.g. telnet)
> that runs as separate services (socket activation) and if a user (or
> an automated test) logs in and (re)starts a daemon that still belongs
> to the legacy blob, it will end up running in the telnet group instead
> of in the legacy group where it is supposed to be. When the client
> disconnects, either the daemon will be killed or if KillMode=none is
> set the process will run but still belong to the cgroup from an old
> telnet session.  Is there a way to have the telnet sessions run as
> part of the legacy group instead?

Usually pam_systemd + logind are used to make sure every login session
gets its own cgroup...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list