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:
Nirjas Jakilim
2025-04-02 18:02:29 +06:00
committed by GitHub
parent de7cff2b54
commit 662866981e

View File

@ -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;
}
}