Merge changes from topic 'remove_bg_cgroup'

am: e941c5fa41

Change-Id: Icb9b9591ffe353dfcbf782437b4f06481a8fdf3a
This commit is contained in:
Wei Wang 2017-03-21 22:20:14 +00:00 committed by android-build-merger
commit 857e716f3e

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