[Cluster-devel] cluster/ccs/daemon cnx_mgr.c
rohara at sourceware.org
rohara at sourceware.org
Wed Feb 14 16:23:47 UTC 2007
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: rohara at sourceware.org 2007-02-14 16:23:47
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&only_with_tag=STABLE&r1=1.24.2.6.4.3.2.4&r2=1.24.2.6.4.3.2.5
--- cluster/ccs/daemon/cnx_mgr.c 2006/06/15 21:39:31 1.24.2.6.4.3.2.4
+++ cluster/ccs/daemon/cnx_mgr.c 2007/02/14 16:23:47 1.24.2.6.4.3.2.5
@@ -1233,9 +1233,13 @@
fail:
error = write(afd, ch, sizeof(comm_header_t)+ch->comm_payload_size);
if(error < 0){
- if (errno == EINTR)
+ 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;
More information about the Cluster-devel
mailing list