<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> (The above is slightly misleading) there could be an alternative of<br>
> something like RemainAfterExit=yes for scopes, i.e. such scopes would<br>
> not be stopped after last process exiting (but systemd would still be in<br>
> charge of cleaning the cgroup after explicit stop request and that'd<br>
> also mark the scope as truly stopped).<br>
<br>
Yeah, I'd be fine with adding RemainAfterExit= to scope units<br>
<br></blockquote><div><br></div><div>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.</div><div>AFAIK RemainAfterExit for services actually does cleanup the cgroup tree if there are no more processes in it.</div><div><br></div><div>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.<br></div><div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Such a recycled scope would only be useful via<br>
> org.freedesktop.systemd1.Manager.AttachProcessesToUnit().<br>
<br>
Well, if delegation is on, then people don#t really have to use our<br>
API, they can just do that themselves.<br>
<br></blockquote><div><br></div><div>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?</div><div>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?<br></div><br></div></div>