mirror of
https://github.com/zhaarey/wrapper.git
synced 2025-10-23 15:11:05 +00:00
Compare commits
3 Commits
de7cff2b54
...
f3b208fabb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3b208fabb | ||
|
|
cbb7f3f62f | ||
|
|
662866981e |
@@ -8,6 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
|
||||
pid_t child_proc = -1;
|
||||
|
||||
@@ -35,6 +36,11 @@ int main(int argc, char *argv[], char *envp[]) {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user