* Alejandro Colomar , 2022-12-11 18:33: >>-to the nice value for the calling thread. >>+to the nice value for the calling process. nice() affecting the whole process, not just the calling thread, is what POSIX requires, and what glibc documents, but it's not actually how it works on Linux at the moment[*]. This is documented in the setpriority(2) man page: "According to POSIX, the nice value is a per-process setting. However, under the current Linux/NPTL implementation of POSIX threads, the nice value is a per-thread attribute: different threads in the same process can have different nice values. Portable applications should avoid relying on the Linux behavior, which may be made standards conformant in the future." It would be prudent to document this bug in the nice(2) man page too. [*] I've tested this with Linux 6.0 + glibc 2.36. See the attached test program. -- Jakub Wilk