Linux, Android: fix call to setpriority(2).
setpriority(), when used with PRIO_PROCESS, should affect the whole
process (i.e. thread group). On Linux the system call only affects one
thread (this bug is documented in
http://man7.org/linux/man-pages/man2/getpriority.2.html) and thus lets
the caller specify a tid.
This CL changes the call to setpriority(PRIO_PROCESS, tid, ...) to
setpriority(PRIO_PROCESS, 0, ...), which is strictly equivalent, albeit
slightly more correct.
This makes filtering system calls in our sandbox easier, as the current thread
id is not known to the BPF filter.
BUG=399473
R=mdempsky@chromium.org, willchan@chromium.org
Review URL: https://codereview.chromium.org/434803003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286964 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: f4a71e3804c92623798ca2320120c677c6d12866
2 files changed