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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 437 - (show annotations) (download)
Mon Aug 28 16:47:44 2006 UTC (7 years, 7 months ago) by phreak
File size: 551 byte(s)
Updating the patchset, some misc patches from Debian.
1 Index: dietlibc-0.30/lib/__nice.c
2 ===================================================================
3 --- dietlibc-0.30.orig/lib/__nice.c
4 +++ dietlibc-0.30/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