Check-in [0238e54ff3]
Not logged in
Overview

SHA1 Hash:0238e54ff352117c8ecfdce24b3918fd28a605e5
Date: 2007-08-01 13:50:58
User: drh
Comment:Client must ignore SIGPIPE when writting to the HTTP socket.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/http.c from [e887c92c4d] to [3357e23c47].

@@ -29,10 +29,11 @@
 #include <arpa/inet.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#include <signal.h>
 
 /*
 ** Persistent information about the HTTP connection.
 */
 static FILE *pSocket = 0;   /* The socket on which we talk to the server */
@@ -76,10 +77,11 @@
   }
   if( connect(s,(struct sockaddr*)&addr,sizeof(addr))<0 ){
     fossil_panic("cannot connect to host %s:%d", g.urlName, g.urlPort);
   }
   pSocket = fdopen(s,"r+");
+  signal(SIGPIPE, SIG_IGN);
   return 0;
 }
 
 /*
 ** Make a single attempt to talk to the server.  Return TRUE on success