[hurd, commited] hurd: make setpriority clamp nice values to 0..2*NZERO-1 [BZ #33614]
Collin Funk
collin.funk1@gmail.com
Sun Nov 9 20:06:59 GMT 2025
Samuel Thibault <samuel.thibault@gnu.org> writes:
>> > + prio = MAX (0, MIN (2 * NZERO - 1, prio));
>> > +
>> > error_t setonepriority (pid_t pid, struct procinfo *pi)
>> > {
>> > task_t task;
>>
>> Isn't NZERO defined to 20 on Hurd? That means (2 * NZERO - 1) == 39, but
>> Hurd's max niceness is 38.
>
> I fixed that part in Gnumach.
Great, thanks! My coreutils change, which I have not pushed yet [1],
clamped the value from 0 - 38 inclusive if __gnu_hurd__ was defined.
Should that be changed to also check that glibc ≤ 2.42 based on
__GLIBC__ and __GLIBC_MINOR__?
Collin
[1] https://lists.gnu.org/archive/html/coreutils/2025-11/msg00096.html
More information about the Libc-alpha
mailing list