/[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.3 - (show annotations) (download)
Sat Feb 1 04:18:18 2014 UTC (10 years, 9 months ago) by wellsi
Branch: MAIN
CVS Tags: dietlibc-0_30-4_el5_sme_2, HEAD
Changes since 1.2: +0 -0 lines
* Fri Jan 31 2014 Ian Wells <esmith@wellsi.com> 0.30-4.2
- Roll for SME 8 [SME: 8078]

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