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

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

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


Revision 1.1 - (show annotations) (download)
Tue Jun 12 15:03:52 2007 UTC (17 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: dietlibc-0_30-4_el4_sme_1, HEAD
Error occurred while calculating annotation data.
Import on branch sme7 of package dietlibc-0.30-4.el4.sme.1.src.rpm

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