/[vps]/dietlibc/patches/0.30_pre20060501-r1/21_all_nice.patch
Gentoo

Contents of /dietlibc/patches/0.30_pre20060501-r1/21_all_nice.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 352 - (show annotations) (download)
Tue May 2 15:11:48 2006 UTC (8 years, 7 months ago) by phreak
File size: 551 byte(s)
Starting -r1 patch series for the cvs snapshot, that should fix my diet.ld.conf "bug"
1 Index: dietlibc-0.29/lib/__nice.c
2 ===================================================================
3 --- dietlibc-0.29.orig/lib/__nice.c
4 +++ dietlibc-0.29/lib/__nice.c
5 @@ -1,9 +1,14 @@
6 #include "syscalls.h"
7 #include <sys/time.h>
8 #include <sys/resource.h>
9 +#include <errno.h>
10
11 #ifndef __NR_nice
12 int nice(int i) {
13 - return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i);
14 + if (setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i) == -1) {
15 + errno=EPERM;
16 + return -1;
17 + }
18 + return getpriority(PRIO_PROCESS,0);
19 }
20 #endif

  ViewVC Help
Powered by ViewVC 1.1.20