Репозитории ALT
5.1: | 0.30-alt3 |
4.1: | 0.30-alt3 |
4.0: | 0.30-alt3 |
3.0: | 0.28-alt1 |
Группа :: Разработка/C
Пакет: dietlibc
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: dietlibc-0.28-setpriority.patch
Скачать
Скачать
--- dietlibc-0.28-unpatched/lib/__nice.c 2005-02-13 18:01:18.966469056 -0500
+++ dietlibc-0.28/lib/__nice.c 2005-02-13 18:17:04.381744088 -0500
@@ -1,9 +1,13 @@
#include "syscalls.h"
-#include <sys/time.h>
+#include <errno.h>
#include <sys/resource.h>
#ifndef __NR_nice
int nice(int i) {
- return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i);
+ if (setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i) == -1) {
+ errno=EPERM;
+ return -1;
+ }
+ return getpriority(PRIO_PROCESS,0);
}
#endif