3 Commits
arm64 ... arm64

Author SHA1 Message Date
f3b208fabb Update wrapper.c 2025-04-17 15:11:58 +08:00
cbb7f3f62f Merge pull request #23 from Nirzak/patch-1
Adding unshare back to fix hang issue
2025-04-17 15:03:55 +08:00
662866981e 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.
2025-04-02 18:02:29 +06:00

View File

@ -8,6 +8,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sched.h>
pid_t child_proc = -1;
@ -34,7 +35,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 +59,4 @@ int main(int argc, char *argv[], char *envp[]) {
execve("/system/bin/main", argv, envp);
perror("execve");
return 1;
}
}