Package: manpages-dev
Version: 1.70-1
Severity: normal

Hi,

it seems that the nice(2) manpage is wrong, as it says:

On success, zero is returned.  On error, -1 is returned, and errno is
set appropriately.

and later, in the notes:

Note that the routine is documented in SUSv2 and POSIX 1003.1â2003 to
return the new nice value, while the Linux syscall and  (g)libc (earlier
than  glibc  2.2.4)  routines return 0 on success.  The new nice value
can be found using getpriority(2).  Note that an implementation in which
nice returns the new nice value can legitimately return -1.  To reliably
detect an error, set errno to 0 before the call, and check  its  value
when nice returns -1.


But since sarge ships glibc 2.3.2 and the actual implementation of
nice() is to return the new nice value it would be nice to say that
immediately in the "return values" and leave the behaviour of the older
version in the notes section...

Thanks,

Guido

Reply via email to