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

Commit e874f6b0 authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Android (Google) Code Review
Browse files

Merge "Revert "Treat process group creation failure due to a dead process as...

Merge "Revert "Treat process group creation failure due to a dead process as non-fatal"" into udc-qpr-dev
parents dead0f9c b910c590
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -1806,17 +1806,12 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,
    if (!is_system_server && getuid() == 0) {
        const int rc = createProcessGroup(uid, getpid());
        if (rc != 0) {
            if (rc == -ESRCH) {
                // If process is dead, treat this as a non-fatal error
                ALOGE("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc));
            } else {
            fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "
                                                "CONFIG_CGROUP_CPUACCT?")
                                 : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid,
                                                /* pid= */ 0, strerror(-rc)));
        }
    }
    }

    SetGids(env, gids, is_child_zygote, fail_fn);
    SetRLimits(env, rlimits, fail_fn);