[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/ccs/daemon cnx_mgr.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	rohara sourceware org	2007-02-13 20:54:56

Modified files:
	ccs/daemon     : cnx_mgr.c 

Log message:
	Ignore EPIPE error when sending response. This can happen is, for example,
	rgmanager makes a request, ccs receives/processes the request, but rgmanager
	dies before ccs can send the response.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/cnx_mgr.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.24.2.13&r2=1.24.2.14

--- cluster/ccs/daemon/cnx_mgr.c	2006/06/15 21:39:06	1.24.2.13
+++ cluster/ccs/daemon/cnx_mgr.c	2007/02/13 20:54:56	1.24.2.14
@@ -1232,10 +1232,14 @@
 
  fail:
   error = write(afd, ch, sizeof(comm_header_t)+ch->comm_payload_size);
-  if(error < 0){
+  if(error < 0) {
     if (errno == EINTR)
       goto fail;
-    log_sys_err("Unable to write package back to sender");
+    if (errno == EPIPE) {
+      error = 0;
+    } else {
+      log_sys_err("Unable to write package back to sender");
+    }
   } else if(error < (sizeof(comm_header_t)+ch->comm_payload_size)){
     log_err("Unable to write complete package.\n");
     error = -EBADE;
@@ -1246,7 +1250,6 @@
 
   if(ch){ free(ch); }
   if(payload){ free(payload); }
-  
 
   EXIT("process_request");
   return error;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]