]> git.ipfire.org Git - thirdparty/coreutils.git/commit
nice: clamp the niceness correctly on GNU/Hurd
authorCollin Funk <collin.funk1@gmail.com>
Sun, 9 Nov 2025 04:30:08 +0000 (20:30 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 10 Nov 2025 02:48:34 +0000 (18:48 -0800)
commitfc93a44bbe9020cb1a5b03499f5fb2f7512d1551
tree8f11aba42ce7aebed7f025c01edbf13ab8e792c3
parent56fc0e6f8d4d7cce77fa36a4dd2500b3841645ef
nice: clamp the niceness correctly on GNU/Hurd

* NEWS: Mention the bug fix.
* src/nice.c (MIN_ADJUSTMENT): Set to 0 on the Hurd with glibc ≤ 2.42.
(MAX_ADJUSTMENT): Set to (2 * NZERO - 2) on the Hurd with glibc ≤ 2.42.
(main): Clamp the niceness to be greater or equal to MIN_ADJUSTMENT and
less than or equal to MAX_ADJUSTMENT.
* tests/nice/nice.sh: Add some tests for the Hurd's ranges.
NEWS
src/nice.c
tests/nice/nice.sh