diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index a7964fb5a9..ae8f2d1160 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -1104,6 +1104,11 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **path) { if (!p) return -ENOMEM; + /* Truncate suffix indicating the process is a zombie */ + e = endswith(p, " (deleted)"); + if (e) + *e = 0; + *path = p; return 0; }