Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
ac8372dd
Commit
ac8372dd
authored
Feb 26, 2021
by
vvb2060
Committed by
John Wu
Feb 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cgroup2 path
https://android-review.googlesource.com/c/platform/system/core/+/1585101
parent
5e56a6bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
daemon.cpp
native/jni/core/daemon.cpp
+9
-2
No files found.
native/jni/core/daemon.cpp
View file @
ac8372dd
...
@@ -247,8 +247,15 @@ static void daemon_entry(int ppid) {
...
@@ -247,8 +247,15 @@ static void daemon_entry(int ppid) {
// Make sure ppid is not in acct
// Make sure ppid is not in acct
char
src
[
64
],
dest
[
64
];
char
src
[
64
],
dest
[
64
];
sprintf
(
src
,
"/acct/uid_0/pid_%d"
,
ppid
);
sprintf
(
src
,
"/acct/uid_0/pid_%d"
,
ppid
);
if
(
access
(
src
,
F_OK
)
==
0
)
{
sprintf
(
dest
,
"/acct/uid_0/pid_%d"
,
getpid
());
sprintf
(
dest
,
"/acct/uid_0/pid_%d"
,
getpid
());
rename
(
src
,
dest
);
rename
(
src
,
dest
);
}
sprintf
(
src
,
"/sys/fs/cgroup/uid_0/pid_%d"
,
ppid
);
if
(
access
(
src
,
F_OK
)
==
0
)
{
sprintf
(
dest
,
"/sys/fs/cgroup/uid_0/pid_%d"
,
getpid
());
rename
(
src
,
dest
);
}
// Get self stat
// Get self stat
xreadlink
(
"/proc/self/exe"
,
src
,
sizeof
(
src
));
xreadlink
(
"/proc/self/exe"
,
src
,
sizeof
(
src
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment