KDE-3.5.10 hangs on startup!

Dirk Mueller mueller at kde.org
Wed Sep 10 12:38:33 BST 2008


On Friday 29 August 2008, Andreas Haumer wrote:

> In my case, set_protection() will always return 0, because
> I'm running Linux 2.4 and I do not have the "/proc/%d/oom_adj"
> file!
I guess you still have a /stat file, although I cannot find a linux 2.4 based 
machine at the moment to confirm. 

can you try the following patch:

--- start_kdeinit.c	(revision 859443)
+++ start_kdeinit.c	(working copy)
@@ -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 )


Thanks,
Dirk







More information about the kde-core-devel mailing list