Merge changes from topic 'remove_bg_cgroup' am: e941c5fa41

am: 857e716f3e

Change-Id: Ic60ff334426dc5ab8ff08a2e054de59d50dfad5d
This commit is contained in:
Wei Wang 2017-03-21 22:27:10 +00:00 committed by android-build-merger
commit 5e06a34e03
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}