Merge pull request #23 from Nirzak/patch-1

Adding unshare back to fix hang issue
This commit is contained in:
ZHAAREY
2025-04-17 15:03:55 +08:00
committed by GitHub

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