mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-03 13:47:04 +03:00
systemctl: show cgroup tree if cgroup is empty but has non-empty children
This makes sure "systemctl status user.slice" shows a nice cgroup tree of all logged in users.
This commit is contained in:
parent
9d12709626
commit
042f9f5e5e
@ -2788,7 +2788,7 @@ static void print_status_info(UnitStatusInfo *i) {
|
||||
printf(" Status: \"%s\"\n", i->status_text);
|
||||
|
||||
if (i->control_group &&
|
||||
(i->main_pid > 0 || i->control_pid > 0 || cg_is_empty(SYSTEMD_CGROUP_CONTROLLER, i->control_group, false) == 0)) {
|
||||
(i->main_pid > 0 || i->control_pid > 0 || cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, i->control_group, false) == 0)) {
|
||||
unsigned c;
|
||||
|
||||
printf(" CGroup: %s\n", i->control_group);
|
||||
|
Loading…
x
Reference in New Issue
Block a user