From 880b348ce66750a77d446270509d73bfc411600b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=8B=E9=A1=B5?= <31466456+canyie@users.noreply.github.com> Date: Tue, 28 Dec 2021 07:41:22 +0800 Subject: [PATCH] Add an old cgroup path Fix topjohnwu#5125 cgroup root path might be mem cgroup instead of acct, especially on low-ram devices. https://android.googlesource.com/platform/system/core/+/bc131c3244a6aa4961092ba08285f9d0435a8882%5E%21/#F0 --- native/jni/core/daemon.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/jni/core/daemon.cpp b/native/jni/core/daemon.cpp index 034b1371e..2d841d017 100644 --- a/native/jni/core/daemon.cpp +++ b/native/jni/core/daemon.cpp @@ -305,6 +305,7 @@ static void daemon_entry() { // Escape from cgroup int pid = getpid(); switch_cgroup("/acct", pid); + switch_cgroup("/dev/memcg/apps", pid); switch_cgroup("/dev/cg2_bpf", pid); switch_cgroup("/sys/fs/cgroup", pid);