]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: move pid watch/unwatch logic of the service manager to pidfd
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Sep 2023 19:58:55 +0000 (21:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Sep 2023 21:22:58 +0000 (23:22 +0200)
commit495e75ed5c8cce933947dae10a4a1b5f8067e432
tree751d645949000ae3aaab8c82aecec8b13f5655f1
parentc407bfa68ff303eee230939461acf3fa8870b8f9
core: move pid watch/unwatch logic of the service manager to pidfd

This makes sure unit_watch_pid() and unit_unwatch_pid() will track
processes by pidfd if supported. Also ports over some related code.
Should not really change behaviour.

Note that this does *not* add support waiting for POLLIN on the pidfds
as additional exit notification. This is left for a later commit (this
commit is already large enough), in particular as that would add new
logic and not just convert existing logic.
14 files changed:
src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-manager.c
src/core/dbus-scope.c
src/core/dbus-unit.c
src/core/manager.c
src/core/manager.h
src/core/mount.c
src/core/scope.c
src/core/service.c
src/core/socket.c
src/core/swap.c
src/core/unit.c
src/core/unit.h