Currently, when ThreadPriorityPolicy is set to 1 (so called Aggressive mode), on linux and bsd(+Mac) a root-user-check (geteuid() != 0)) is done. See for example the coding in jdk/src/hotspot/os/linux/os_linux.cpp int prio_init(). However the root-user-check has a few drawbacks: - it blocks the capabilities feature available on current Linux distros (CAP_SYS_NICE capability) that can be used to allow setting lower niceness also for non-root - setting a higher "niceness" (lower priority) is not possible on Linux for non-root because of the geteuid check
|