summaryrefslogtreecommitdiff
path: root/src/core/cgroup.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-03 14:57:44 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-04 09:07:31 +0200
commitb3ac818be8d73c97dc4f74ba8bbd2091506df2e6 (patch)
treeb2c5055a9ba2fd3da48005e305ad27d3d273de9b /src/core/cgroup.h
parent569b19d8fedc4525a6c15f1a3ab9c15dcb7c694a (diff)
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.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r--src/core/cgroup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index 1ce21f43f2..438f5bf50f 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -130,6 +130,7 @@ void manager_shutdown_cgroup(Manager *m, bool delete);
unsigned manager_dispatch_cgroup_queue(Manager *m);
Unit *manager_get_unit_by_cgroup(Manager *m, const char *cgroup);
+Unit *manager_get_unit_by_pid_cgroup(Manager *m, pid_t pid);
Unit* manager_get_unit_by_pid(Manager *m, pid_t pid);
int unit_search_main_pid(Unit *u, pid_t *ret);