From bad75c274a488715a845ff8e5ec3140036929e94 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 3 Jan 2012 23:41:55 +0100 Subject: [PATCH] journald: fix _SYSTEMD_CGROUP= values --- src/journal/journald.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/journal/journald.c b/src/journal/journald.c index 1faf5701..b42be8d7 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -391,7 +391,9 @@ static char *shortened_cgroup_path(pid_t pid) { return NULL; } - if (streq(init_path, "/")) + if (endswith(init_path, "/system")) + init_path[strlen(init_path) - 7] = 0; + else if (streq(init_path, "/")) init_path[0] = 0; if (startswith(process_path, init_path)) { -- 2.39.5