Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3089bed1 authored by Colin Cross's avatar Colin Cross
Browse files

Zygote: make libprocessgroup failures non-fatal

createProcessGroup can fail if the kernel does not support the
cpuacct cgroup.  Print a more useful error message, and don't
runtime abort.

Bug: 16243791
Change-Id: Ibbf081bda58a99c83b8070f55d151905c706b378
parent 85cfec81
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -439,8 +439,11 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
    if (!is_system_server) {
        int rc = createProcessGroup(uid, getpid());
        if (rc != 0) {
            if (rc == -EROFS) {
                ALOGW("createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?");
            } else {
                ALOGE("createProcessGroup(%d, %d) failed: %s", uid, pid, strerror(-rc));
            RuntimeAbort(env);
            }
        }
    }