[systemd-devel] ability to associate new process with cgroups of an RPC client

Darren Shepherd darren.s.shepherd at gmail.com
Mon Oct 13 16:29:37 PDT 2014


I'm looking for guidance on how the following can be done with systemd or
if there is a different approach.  Imagine I have a daemon that forks
processes based on a RPC request.  If the deamon is running in
daemon.service and the RPC client is running is session-42.scope.  I would
like the daemon to be able to fork a new process in session-42.scope, or as
a new cgroup that is a child of the callers cgroup.

>From what I understand of systemd is that the only way to create a process
and put it in a cgroup is to create a transient unit with the PIDs
property, but there seems to be no way to associate the transient unit with
an existing cgroup.  I realize creating a transient unit in an existing
cgroup may not make any sense because the unit no longer can use cgroups
for grouping processes.  So it seems that there should be a different API
of systemd to join a process to an arbitrary cgroup.

Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141013/bf01cb70/attachment.html>


More information about the systemd-devel mailing list