Filter leading colons in CGROUP name

This commit is contained in:
Benny Baumann 2021-11-06 17:20:37 +01:00 committed by BenBE
parent 1c3c149d20
commit ea4282784d
1 changed files with 10 additions and 3 deletions

View File

@ -872,9 +872,16 @@ static void LinuxProcessList_readCGroupFile(LinuxProcess* process, openat_arg_t
if (!ok)
break;
char* group = strchr(buffer, ':');
if (!group)
break;
char* group = buffer;
for (size_t i = 0; i < 2; i++) {
group = strchrnul(group, ':');
if (!*group)
break;
group++;
}
char* eol = strchrnul(group, '\n');
*eol = '\0';
if (at != output) {
*at = ';';