mirror of
https://github.com/zhaarey/wrapper.git
synced 2025-07-02 08:09:54 +09:00
adding unshare back to fix hang issue
wrapper arm version is highly dependent on the child parent process structure. so without unshare the child process may never exit causing the hang issue.
This commit is contained in:
@ -34,7 +34,12 @@ int main(int argc, char *argv[], char *envp[]) {
|
||||
mknod("/dev/urandom", S_IFCHR | 0666, makedev(0x1, 0x9));
|
||||
chmod("/system/bin/linker64", 0755);
|
||||
chmod("/system/bin/main", 0755);
|
||||
|
||||
|
||||
if (unshare(CLONE_NEWPID)) {
|
||||
perror("unshare");
|
||||
return 1;
|
||||
}
|
||||
|
||||
child_proc = fork();
|
||||
if (child_proc == -1) {
|
||||
perror("fork");
|
||||
@ -53,4 +58,4 @@ int main(int argc, char *argv[], char *envp[]) {
|
||||
execve("/system/bin/main", argv, envp);
|
||||
perror("execve");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user