cluster: STABLE32 - rgmanager: die hard if we cpglockd dies

Ryan McCabe rmccabe at fedoraproject.org
Tue May 1 13:43:44 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4fd8e8cc76af3152a1520ea4acbc6733ba06f2a3
Commit:        4fd8e8cc76af3152a1520ea4acbc6733ba06f2a3
Parent:        564207f3f2699a567c01f1b395d7a760989b36a0
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Tue Apr 24 16:30:32 2012 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Tue Apr 24 17:04:10 2012 +0200

rgmanager: die hard if we cpglockd dies

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/clulib/cpg_lock.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/clulib/cpg_lock.c b/rgmanager/src/clulib/cpg_lock.c
index 7cff2a3..d257cf4 100644
--- a/rgmanager/src/clulib/cpg_lock.c
+++ b/rgmanager/src/clulib/cpg_lock.c
@@ -12,6 +12,7 @@
 #include <sys/types.h>
 #include <sys/select.h>
 #include <pthread.h>
+#include <signal.h>
 
 #include <cpglock.h>
 
@@ -69,9 +70,13 @@ _cpg_lock(int mode,
 		ret = cpg_lock(_cpgh, resource, 1, &l);
 	else
 		ret = cpg_lock(_cpgh, resource, 0, &l);
-	
+
 	if (ret == 0) {
 		cpg2dlm(&l, lksb);
+	} else {
+		if (errno == EPIPE) {
+			raise(SIGSEGV);
+		}
 	}
 
 	return ret;


More information about the cluster-commits mailing list