summaryrefslogtreecommitdiff
path: root/src/systemctl.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/systemctl.c
parent55096547212928b0ba83fca2595cae0d66d3c0b0 (diff)
cgroup: kill processes, not tasks and other cgroup changes
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 53b6b47b61..799f57d006 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -43,6 +43,7 @@
#include "strv.h"
#include "dbus-common.h"
#include "cgroup-show.h"
+#include "cgroup-util.h"
#include "list.h"
static const char *arg_type = NULL;
@@ -1053,6 +1054,7 @@ typedef struct UnitStatusInfo {
static void print_status_info(UnitStatusInfo *i) {
ExecStatusInfo *p;
+ int r;
assert(i);
@@ -1183,7 +1185,10 @@ static void print_status_info(UnitStatusInfo *i) {
else
c = 0;
- show_cgroup_recursive(i->default_control_group, "\t\t ", c);
+ if ((r = cg_init()) < 0)
+ log_error("Failed to initialize libcg: %s", strerror(-r));
+ else
+ show_cgroup_recursive(i->default_control_group, "\t\t ", c);
}
}