Skip to content

Commit

Permalink
Add an old cgroup path
Browse files Browse the repository at this point in the history
Fix #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
  • Loading branch information
canyie authored and topjohnwu committed Dec 29, 2021
1 parent 31fe3a1 commit 880b348
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions native/jni/core/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 880b348

Please sign in to comment.