yaneurabeya/freebsd — pull request #6 by yaneurabeya (2014-05-14 21:52:54+00:00)
Title:  Make nice(3) POSIX compliant and compatible with Linux/NetBSD 

nice(3) in Linux/NetBSD/POSIX returns EPERM if the value of incr is negative and the user cannot nice the process for permissions reasons. FreeBSD on the other hand returns the value from setpriority, which is EACCES, not EPERM.

The new code translates EPERM to EACCES from setpriority.