/[smeserver]/rpms/dietlibc/sme8/dietlibc-0.28-setpriority.patch
ViewVC logotype

Contents of /rpms/dietlibc/sme8/dietlibc-0.28-setpriority.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sun Mar 30 20:55:52 2008 UTC (16 years, 8 months ago) by slords
Branch: MAIN
Changes since 1.1: +0 -0 lines
FILE REMOVED
Packages maintained upstream

1 --- dietlibc-0.28-unpatched/lib/__nice.c 2005-02-13 18:01:18.966469056 -0500
2 +++ dietlibc-0.28/lib/__nice.c 2005-02-13 18:17:04.381744088 -0500
3 @@ -1,9 +1,13 @@
4 #include "syscalls.h"
5 -#include <sys/time.h>
6 +#include <errno.h>
7 #include <sys/resource.h>
8
9 #ifndef __NR_nice
10 int nice(int i) {
11 - return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i);
12 + if (setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i) == -1) {
13 + errno=EPERM;
14 + return -1;
15 + }
16 + return getpriority(PRIO_PROCESS,0);
17 }
18 #endif

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed