Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c9a9dbaf2f0c954a1667341d62380ef1b83f1009
Parent: f428fc18c95839c53d4b04f13ea84c529d77a024
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Apr 24 16:30:32 2012 +0200
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Tue May 1 10:59:18 2012 -0400
rgmanager: die hard if we cpglockd dies
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Ryan McCabe <rmccabe(a)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;