21 lines
835 B
Diff
21 lines
835 B
Diff
|
diff -up kdelibs-3.5.10/kinit/start_kdeinit.c.proc kdelibs-3.5.10/kinit/start_kdeinit.c
|
||
|
--- kdelibs-3.5.10/kinit/start_kdeinit.c.proc 2008-08-19 13:18:12.000000000 -0500
|
||
|
+++ kdelibs-3.5.10/kinit/start_kdeinit.c 2008-11-20 15:54:54.000000000 -0600
|
||
|
@@ -44,7 +44,7 @@ static int set_protection( pid_t pid, in
|
||
|
{
|
||
|
char buf[ 1024 ];
|
||
|
int procfile;
|
||
|
- sprintf( buf, "/proc/%d/oom_adj", pid );
|
||
|
+ sprintf( buf, "/proc/%d/stat", pid );
|
||
|
if( !enable ) {
|
||
|
/* Be paranoid and check that the pid we got from the pipe
|
||
|
belongs to this user. */
|
||
|
@@ -52,6 +52,7 @@ static int set_protection( pid_t pid, in
|
||
|
if( lstat( buf, &st ) < 0 || st.st_uid != getuid())
|
||
|
return 0;
|
||
|
}
|
||
|
+ sprintf( buf, "/proc/%d/oom_adj", pid );
|
||
|
procfile = open( buf, O_WRONLY );
|
||
|
if( procfile >= 0 ) {
|
||
|
if( enable )
|