[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    BUG:kfm (fwd) + patch
From:       David McCanney <D.McCanney () udcf ! gla ! ac ! uk>
Date:       1998-01-07 21:46:24
[Download RAW message or body]

Hi,

I have forwarded this one to the list, 'cause I though it was an important
fix.

--

Regards,
	
	--David

"The Truth may be out there, but the lies are inside your head" 



---------- Forwarded message ----------
Date: Wed, 07 Jan 1998 02:12:47 +0100
From: Ingo Schneider <schneidi@informatik.tu-muenchen.de>
To: kde-bugs@kde.org
Subject: BUG:kfm

Hello !

I found a serious bug in kfm (version beta1, beta2, and 980105).
I was wondering why sometimes my kfm sometimes died silently with SEGV.
Then I found out, that it did so after receiving the SIGCHILD from
the just startet kfmclient.
And then, after some searching, I couldn't believe my eyes.
Some absolute C-newbie did call read() without checking
for an error condition (EINTR in this case).
Hope that is not the same person, who wrote the rest of kfm...

Attached is a patch, which describes the location of this bug.

Bah!

Ingo.

-- 
QOTD: "Windows users are generally regarded as either thieves, people who
       lost their keys, or just complete morons too stupid to use doors."
Email: Ingo.Schneider@informatik.tu-muenchen.de
URL: http://www.informatik.tu-muenchen.de/~schneidi/

["diff" (TEXT/PLAIN)]

--- kfm.orig/kfmserver_ipc.cpp	Fri Oct 10 14:42:36 1997
+++ kfm/kfmserver_ipc.cpp	Wed Jan  7 02:01:11 1998
@@ -103,6 +103,15 @@
 	
     int n;
     n = read( data_sock->socket(), pBody + cBody, bodyLen - cBody );
+    if (n<0) {
+	if (errno == EINTR) return;
+	else {
+	    // Give a Error Message here, ignored for now
+	    return;
+	}
+
+    }
+
     if ( n + cBody == bodyLen )
     {
 	pBody[bodyLen] = 0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic