mirror of
https://abf.rosa.ru/djam/glibc.git
synced 2025-02-23 15:02:47 +00:00
17 lines
479 B
Diff
17 lines
479 B
Diff
![]() |
--- glibc-2.6.orig/sysdeps/unix/nice.c 2006-08-15 02:24:45.000000000 -0300
|
||
|
+++ glibc-2.6/sysdeps/unix/nice.c 2007-06-25 14:40:24.000000000 -0300
|
||
|
@@ -42,7 +42,12 @@
|
||
|
__set_errno (save);
|
||
|
}
|
||
|
|
||
|
- result = setpriority (PRIO_PROCESS, 0, prio + incr);
|
||
|
+ prio += incr;
|
||
|
+ if (prio < PRIO_MIN)
|
||
|
+ prio = PRIO_MIN;
|
||
|
+ else if (prio >= PRIO_MAX)
|
||
|
+ prio = PRIO_MAX - 1;
|
||
|
+ result = setpriority (PRIO_PROCESS, 0, prio);
|
||
|
if (result == -1)
|
||
|
{
|
||
|
if (errno == EACCES)
|