chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgroup: kill processes, not tasks and other cgroup changes
[elogind.git]
/
src
/
systemd-cgls.c
diff --git
a/src/systemd-cgls.c
b/src/systemd-cgls.c
index 6614f0fd2539c53369070053c157b8dffa8cc9b1..bd8d263d0e6941c56f8355bd8430b8cf5879e3ef 100644
(file)
--- a/
src/systemd-cgls.c
+++ b/
src/systemd-cgls.c
@@
-27,6
+27,7
@@
#include <string.h>
#include "cgroup-show.h"
#include <string.h>
#include "cgroup-show.h"
+#include "cgroup-util.h"
#include "log.h"
#include "util.h"
#include "log.h"
#include "util.h"
@@
-82,6
+83,11
@@
int main(int argc, char *argv[]) {
goto finish;
}
goto finish;
}
+ if (cg_init() < 0) {
+ log_error("Failed to initialize libcg: %s", strerror(-r));
+ goto finish;
+ }
+
if (optind < argc) {
unsigned i;
if (optind < argc) {
unsigned i;
@@
-105,7
+111,7
@@
int main(int argc, char *argv[]) {
printf("Working Directory %s:\n", p);
r = show_cgroup_recursive(p, NULL, 0);
} else
printf("Working Directory %s:\n", p);
r = show_cgroup_recursive(p, NULL, 0);
} else
- r = show_cgroup_recursive(
""
, NULL, 0);
+ r = show_cgroup_recursive(
NULL
, NULL, 0);
free(p);
}
free(p);
}