summaryrefslogtreecommitdiffstats
path: root/libcutils
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-03-21 22:09:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-03-21 22:09:51 +0000
commite941c5fa41b6e58e8bda663841dff4da5edcc823 (patch)
tree67367713677de96373370c060a84f6689290672e /libcutils
parente87a826a1df1891d2819aa70d613f7f140b11953 (diff)
parent97957fc420b0d2dc019f4728b2d3611b7305ab91 (diff)
downloadcore-e941c5fa41b6e58e8bda663841dff4da5edcc823.tar.gz
core-e941c5fa41b6e58e8bda663841dff4da5edcc823.tar.bz2
core-e941c5fa41b6e58e8bda663841dff4da5edcc823.zip
Merge changes from topic 'remove_bg_cgroup'
* changes: libcutils: only change cgroup when fd is initialized init.rc: remove bg_non_interactive cgroup
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/sched_policy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp
index 7e3ad593e..40144cf16 100644
--- a/libcutils/sched_policy.cpp
+++ b/libcutils/sched_policy.cpp
@@ -464,7 +464,7 @@ int set_sched_policy(int tid, SchedPolicy policy)
break;
}
- 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;
}