NetBSD-Bugs archive

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

kern/41489: setpriority(2) returns EACCES instead of EPERM

>Number:         41489
>Category:       kern
>Synopsis:       setpriority(2) returns EACCES instead of EPERM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 25 14:40:01 +0000 2009
>Originator:     Stathis Kamperis
>Release:        NetBSD 5.0_STABLE
Aristotle University of Thessaloniki
NetBSD voyager 5.0_STABLE NetBSD 5.0_STABLE (GENERIC) #10: Fri May 22 17:59:56 
EEST 2009  stathis@voyager:/usr/obj/sys/arch/i386/compile/GENERIC i386

According to POSIX's description for setpriority(2):

    A process was located, but neither the real nor effective user ID of the 
executing process match the effective user ID of the process whose nice value 
is being changed.

OTOH, if I try to change the priority of init process I get EACCES. Mind that I 
don't try to increase/lower it. I just re-set it to 0.
Call this and examine errno variable:

setpriority(PRIO_PROCESS, /* init */ 1, /* nice */ 0);


Home | Main Index | Thread Index | Old Index