KDE-3.5.10 hangs on startup!
Andreas Haumer
andreas at xss.co.at
Thu Sep 11 19:17:02 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
Dirk Mueller schrieb:
> 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.
>
Yes, 2.4 Linux kernels do have the /proc/<pid>/stat file,
at least if the proc fs is mounted under /proc (which it
usually, but not necessarily, is!)
> 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 )
>
With this patch the KDE startup process does not hang
anymore (tested on a machine with Linux-2.4.36.6 and
proc fs mounted under /proc)
Thanks!
- - andreas
- --
Andreas Haumer | mailto:andreas at xss.co.at
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjJYJ0ACgkQxJmyeGcXPhH6GACgq/9n3wHVCkWj/gnPhgbWOKUc
OUQAn0AxNEssKz9l9a08x98gYMl/8iyw
=6RtC
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list