NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/42587: nice() returns EACCES instead of (standard mandated) EPERM

>Number:         42587
>Category:       lib
>Synopsis:       nice() returns EACCES instead of (standard mandated) EPERM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 06 15:45:00 +0000 2010
>Originator:     Stathis Kamperis
>Release:        5.0.1
NetBSD 5.0.1 GENERIC/i386 (sorry, handwritter :-))
Quoting from (same applies to Issue 7):

The nice() function shall fail if:
    The incr argument is negative and the calling process does not have
     appropriate privileges.

Linux + OpenSolaris do it right. *BSD I tried return wrong error code.

Call nice(-2) from a non-privileged program and check errno variable. It is 
EACCES, instead of EPERM.

Trivial test case here may be found here:

Replace EACCES with EPERM here.

Home | Main Index | Thread Index | Old Index