From 0e8e4f87fda41a063fbc2858960f20bb49f62ce7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 6 Jan 2023 14:03:37 -0800 Subject: [PATCH] Fix the cgroup v2 thread path The name for the file with thread IDs is "tasks" in the v1 hierarchy and "cgroup.threads" in the v2 hierarchy. References: * https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html * https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html Bug: 213617178 Fixes: 82b72a566761 ("libprocessgroup: Add support for task profiles") Change-Id: I87d67edeb12803cb83486be8f1b1b56a3f275a9d Signed-off-by: Bart Van Assche --- libprocessgroup/cgroup_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libprocessgroup/cgroup_map.cpp b/libprocessgroup/cgroup_map.cpp index 8c0032670..468d796e2 100644 --- a/libprocessgroup/cgroup_map.cpp +++ b/libprocessgroup/cgroup_map.cpp @@ -49,7 +49,7 @@ using android::base::WriteStringToFile; static constexpr const char* CGROUP_PROCS_FILE = "/cgroup.procs"; static constexpr const char* CGROUP_TASKS_FILE = "/tasks"; -static constexpr const char* CGROUP_TASKS_FILE_V2 = "/cgroup.tasks"; +static constexpr const char* CGROUP_TASKS_FILE_V2 = "/cgroup.threads"; uint32_t CgroupController::version() const { CHECK(HasValue());