Fwd: kio: slave process dies when using https

Waldo Bastian bastian at kde.org
Fri Jun 7 20:21:49 BST 2002


The problem is that we shouldn't die/exit on a SIGPIPE. However, we do exactly 
that since the following change to slavebase.cpp

revision 1.114
date: 2002/02/28 13:35:53;  author: coolo;  state: Exp;  lines: +3 -2
Don't endless loop in sigpipe_handler if an application is killed having
a download in progress
-    signal(SIGPIPE,&sigpipe_handler);
+    exit(0);
+    // signal(SIGPIPE,&sigpipe_handler);

Maybe coolo can comment why that change was necassery and why the endless 
looping couldn't be fixed with some error checking in the slave itself. 
Otherwise I will revert that change.

Cheers,
Waldo

On Friday 31 May 2002 09:42 am, Michael Cardenas wrote:
> Well, it seems like the working fix is to disable keep alive connections
> for ssl, as your patch did, since turning on this header didn't solve
> the problem. I'll be happy to turn the keep alive header off. Also, it
> sounds like the 1.1 spec doesn't explicitly say you shouldn't send that
> header, just that it's not necessary.
>
> I think the long term solution for this is to fix tcpslavebase.cpp,
> isConnectionValid. We were encountering a situation where the server had
> closed the connection, but isConnectionValid still returned true, so the
> kio slave wrote to the socket, causing a SIGPIPE. isConnectionValid uses
> this line:
>
>       retval = recv(m_iSock, buffer, 80, MSG_PEEK);
>
> to see if the connection is still open. From the documentation, a zero
> return value from this message only means that there's no pending data
> to be read, not that the connection is closed. Maybe we can use
> getpeername() to see if the connection is still valid, or maybe that's too
> slow.
>
> On Fri, May 31, 2002 at 03:13:47AM -0400, Dawit A. wrote:
> > On Friday 31 May 2002 01:29, you wrote:
> > > I think there's a bug with the fact that the keep-alive header is #if
> > > 0'd out, but the keep alive logic is still there, preventing a new
> > > connection from being opened. We tried just turning on the keep alive
> > > header, but it didn't fix the "process died" error.
> >
> > I highly advice you against doing this.  It was #ifdef out on purpose!
> > It is rather late for me to go into all the gory details of why you do
> > not want to do this.  Please read the http log files @ webcvs.kde.org and
> > kfm-devel list, but here is a small summary:

-- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com





More information about the kfm-devel mailing list