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

Commit e46aae22 authored by Wei Wang's avatar Wei Wang
Browse files

libcutils: only change cgroup when fd is initialized [ DO NOT MERGE ]

This is to avoid failues on setting non-exist cgroup

Bug: 34193533
Test: on marlin
Change-Id: I619dcba332fda9ec421df811745cf10311beddd3
parent 0638626e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ int set_sched_policy(int tid, SchedPolicy policy)
        }


        if (add_tid_to_cgroup(tid, fd) != 0) {
        if (fd > 0 && add_tid_to_cgroup(tid, fd) != 0) {
            if (errno != ESRCH && errno != ENOENT)
                return -errno;
        }