> > (The above is slightly misleading) there could be an alternative of
> > something like RemainAfterExit=yes for scopes, i.e. such scopes would
> > not be stopped after last process exiting (but systemd would still be in
> > charge of cleaning the cgroup after explicit stop request and that'd
> > also mark the scope as truly stopped).
>
> Yeah, I'd be fine with adding RemainAfterExit= to scope units
>
>
Note that what Michal is saying is "something like RemainAfterExit=yes for
scopes", which means systemd would NOT clean up the cgroup tree when there
are no processes inside.
AFAIK RemainAfterExit for services actually does cleanup the cgroup tree if
there are no more processes in it.

If that behavior of keeping the cgroup tree even if there are no pids is
what you agree with, then I coincide is a good idea to include this option
to scopes.



> > Such a recycled scope would only be useful via
> > org.freedesktop.systemd1.Manager.AttachProcessesToUnit().
>
> Well, if delegation is on, then people don#t really have to use our
> API, they can just do that themselves.
>
>
That's not exact. If slurmd (my main process) forks a slurmstepd (child
process) and I want to move slurmstepd into a delegated subtree from the
scope I already created, I must use AttachProcessesToUnit(), isn't that
true?
Or are you saying that I can just migrate processes wildly without
informing systemd and just doing an 'echo > cgroup.procs' from one
non-delegated tree to my delegated subtree?

Reply via email to