Loading cmds/app_process/app_main.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/prctl.h> namespace android { Loading Loading @@ -146,6 +147,15 @@ static const char ZYGOTE_NICE_NAME[] = "zygote"; int main(int argc, char* const argv[]) { if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) { // Older kernels don't understand PR_SET_NO_NEW_PRIVS and return // EINVAL. Don't die on such kernels. if (errno != EINVAL) { LOG_ALWAYS_FATAL("PR_SET_NO_NEW_PRIVS failed: %s", strerror(errno)); return 12; } } AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv)); // Process command line arguments // ignore argv[0] Loading Loading
cmds/app_process/app_main.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/prctl.h> namespace android { Loading Loading @@ -146,6 +147,15 @@ static const char ZYGOTE_NICE_NAME[] = "zygote"; int main(int argc, char* const argv[]) { if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) { // Older kernels don't understand PR_SET_NO_NEW_PRIVS and return // EINVAL. Don't die on such kernels. if (errno != EINVAL) { LOG_ALWAYS_FATAL("PR_SET_NO_NEW_PRIVS failed: %s", strerror(errno)); return 12; } } AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv)); // Process command line arguments // ignore argv[0] Loading