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

Felip Moll felip at schedmd.com
Tue Jan 23 15:40:35 UTC 2024


Hello,
Can somebody give me an insight of what these methods really do?
The documentation is pretty vague:
https://www.freedesktop.org/wiki/Software/systemd/dbus/

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?

Commit a911bb9ab27ac0eb3 says:

When a process dies that we can associate with a specific unit, start
watching all other processes of that unit, so that we can associate
those processes with the unit too.

What does "watching a process" mean?
Are these methods intended to be used only by logind?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240123/346996b4/attachment.htm>


More information about the systemd-devel mailing list