aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/cgroup.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-12 07:36:41 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-12 07:36:41 -0500
commitca79ff961cc303670f1ccb8841495ddd7f17a76b (patch)
tree51de876c47e405afec28eed5562337782265eebe /src/firemon/cgroup.c
parenttesting (diff)
downloadfirejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.tar.gz
firejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.tar.zst
firejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.zip
testing
Diffstat (limited to 'src/firemon/cgroup.c')
-rw-r--r--src/firemon/cgroup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/firemon/cgroup.c b/src/firemon/cgroup.c
index ec2d350af..e20e1d449 100644
--- a/src/firemon/cgroup.c
+++ b/src/firemon/cgroup.c
@@ -44,18 +44,20 @@ static void print_cgroup(int pid) {
44 free(file); 44 free(file);
45} 45}
46 46
47void cgroup(pid_t pid) { 47void cgroup(pid_t pid, int print_procs) {
48 pid_read(pid); 48 pid_read(pid);
49 49
50 // print processes 50 // print processes
51 int i; 51 int i;
52 for (i = 0; i < max_pids; i++) { 52 for (i = 0; i < max_pids; i++) {
53 if (pids[i].level == 1) { 53 if (pids[i].level == 1) {
54 pid_print_list(i, 0); 54 if (print_procs || pid == 0)
55 pid_print_list(i, 0);
55 int child = find_child(i); 56 int child = find_child(i);
56 if (child != -1) 57 if (child != -1)
57 print_cgroup(child); 58 print_cgroup(child);
58 } 59 }
59 } 60 }
61 printf("\n");
60} 62}
61 63