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

Commit 110cd77b authored by Inseob Kim's avatar Inseob Kim
Browse files

Don't retry kill if cgroups isn't available

It makes no sense, because there are no cgroup procs file.

Bug: 257264124
Test: atest MicrodroidBenchmarkApp
Change-Id: I4e3a118d2237afc46aa8fbcbad055afb7d56f464
parent 6dfeccf9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -471,6 +471,11 @@ static int KillProcessGroup(uid_t uid, int initialPid, int signal, int retries,
            *max_processes = processes;
        }
        LOG(VERBOSE) << "Killed " << processes << " processes for processgroup " << initialPid;
        if (!CgroupsAvailable()) {
            // makes no sense to retry, because there are no cgroup_procs file
            processes = 0;  // no remaining processes
            break;
        }
        if (retry > 0) {
            std::this_thread::sleep_for(5ms);
            --retry;