mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 21:37:39 +00:00
Check property before switch mem cgroup
This commit is contained in:
parent
666ab1941f
commit
c82a46c1ee
@ -308,9 +308,11 @@ 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);
|
||||
if (getprop("ro.config.per_app_memcg") != "false") {
|
||||
switch_cgroup("/dev/memcg/apps", pid);
|
||||
}
|
||||
|
||||
// Get self stat
|
||||
char buf[64];
|
||||
|
Loading…
x
Reference in New Issue
Block a user