mirror of https://github.com/xzeldon/htop.git
Filter leading colons in CGROUP name
This commit is contained in:
parent
1c3c149d20
commit
ea4282784d
|
@ -872,9 +872,16 @@ static void LinuxProcessList_readCGroupFile(LinuxProcess* process, openat_arg_t
|
||||||
if (!ok)
|
if (!ok)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
char* group = strchr(buffer, ':');
|
char* group = buffer;
|
||||||
if (!group)
|
for (size_t i = 0; i < 2; i++) {
|
||||||
break;
|
group = strchrnul(group, ':');
|
||||||
|
if (!*group)
|
||||||
|
break;
|
||||||
|
group++;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* eol = strchrnul(group, '\n');
|
||||||
|
*eol = '\0';
|
||||||
|
|
||||||
if (at != output) {
|
if (at != output) {
|
||||||
*at = ';';
|
*at = ';';
|
||||||
|
|
Loading…
Reference in New Issue