summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-11 00:50:49 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-11 00:50:49 +0200
commitc6c18be35bb1d300d0b62a568783cc1c477f7151 (patch)
treee4bad2452f20b6d1d6df9714d6abe72cdc56599c /src/unit.c
parent55096547212928b0ba83fca2595cae0d66d3c0b0 (diff)
cgroup: kill processes, not tasks and other cgroup changes
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unit.c b/src/unit.c
index 5d51f99966..b362fd3b41 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -39,6 +39,7 @@
#include "specifier.h"
#include "dbus-unit.h"
#include "special.h"
+#include "cgroup-util.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
@@ -1144,14 +1145,14 @@ int unit_watch_pid(Unit *u, pid_t pid) {
/* Watch a specific PID. We only support one unit watching
* each PID for now. */
- return hashmap_put(u->meta.manager->watch_pids, UINT32_TO_PTR(pid), u);
+ return hashmap_put(u->meta.manager->watch_pids, LONG_TO_PTR(pid), u);
}
void unit_unwatch_pid(Unit *u, pid_t pid) {
assert(u);
assert(pid >= 1);
- hashmap_remove_value(u->meta.manager->watch_pids, UINT32_TO_PTR(pid), u);
+ hashmap_remove_value(u->meta.manager->watch_pids, LONG_TO_PTR(pid), u);
}
int unit_watch_timer(Unit *u, usec_t delay, Watch *w) {