[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
Changes by:	rohara sourceware org	2007-02-14 16:22:17

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. Also added retry if we catch EINTR
	during write.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/cnx_mgr.c.diff?cvsroot=cluster&r1=1.41&r2=1.42

--- cluster/ccs/daemon/cnx_mgr.c	2006/05/24 08:53:21	1.41
+++ cluster/ccs/daemon/cnx_mgr.c	2007/02/14 16:22:17	1.42
@@ -1235,9 +1235,13 @@
  fail:
   error = write(afd, ch, sizeof(comm_header_t)+ch->comm_payload_size);
   if(error < 0){
-    log_sys_err("Unable to write package back to sender");
-    return error; 
-    goto fail;
+    if (errno == EINTR)
+      goto fail;
+    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;
@@ -1248,7 +1252,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]