[systemd-devel] What are Abandon() and AbandonScope() used for?

Felip Moll felip at schedmd.com
Tue Jan 30 15:46:32 UTC 2024


>
> > When should I use this? For example I am creating a scope which will
> > allocate some pids into their cgroups. The scope is created from a daemon
> > run from a service unit. The service will eventually be shut down and I
> > want the scope to remain if it has pids in it. Should the service
> "abandon"
> > the scope?
>
> That depends whether you want some extra stopping procedure for your
> scope besides regular SIGTERM logic.
>

Cool, so if I just want systemd to send a SIGTERM when OS is shutting down
or when a user does "systemctl stop my.scope", and I do not need any "extra
stopping procedure" (don't know what exactly this is), then I don't need to
Abandon the scope.
It has nothing to do then about keeping a scope when the process that
initiated it has already terminated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240130/fc17e10a/attachment.htm>


More information about the systemd-devel mailing list