]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.c
core: split up manager_get_unit_by_pid()
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2015 12:57:44 +0000 (14:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 4 Sep 2015 07:07:31 +0000 (09:07 +0200)
commitb3ac818be8d73c97dc4f74ba8bbd2091506df2e6
treeb2c5055a9ba2fd3da48005e305ad27d3d273de9b
parent569b19d8fedc4525a6c15f1a3ab9c15dcb7c694a
core: split up manager_get_unit_by_pid()

Let's move the actual cgroup part of it into a new separate function
manager_get_unit_by_pid_cgroup(), and then make
manager_get_unit_by_pid() just a wrapper that also checks the two pid
hashmaps.

Then, let's make sure the various calls that want to deliver events to
the owners of a PID check both hashmaps and the cgroup and deliver the
event to *each* of them. OTOH make sure bus calls like GetUnitByPID()
continue to check the PID hashmaps first and the cgroup only as
fallback.
src/core/cgroup.c
src/core/cgroup.h
src/core/manager.c