[packages/dlm] Ignore SIGHUP, do graceful exit on SIGINT
jajcus
jajcus at pld-linux.org
Fri Nov 2 09:37:48 CET 2012
commit dd1619fbd5914b9ef1c3514690feca9b0c46b517
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Fri Nov 2 09:20:02 2012 +0100
Ignore SIGHUP, do graceful exit on SIGINT
Killing dlm_controld by mistake may case the node to be fenced off
(turned off or rebooted) and using Ctrl-C is the natural way
to stop dlm_controld started on a console, for debugging.
dlm-signals.patch | 19 +++++++++++++++++++
dlm.spec | 2 ++
2 files changed, 21 insertions(+)
---
diff --git a/dlm.spec b/dlm.spec
index a897131..903da6c 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -17,6 +17,7 @@ Patch0: %{name}-link_order.patch
Patch1: %{name}-after_configfs.patch
Patch2: %{name}_stonith-build.patch
Patch3: %{name}-mem_init.patch
+Patch4: %{name}-signals.patch
URL: http://sources.redhat.com/cluster/dlm/
BuildRequires: corosync-devel
%{?with_dlm_stonith:BuildRequires: corosync-devel}
@@ -70,6 +71,7 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
%{__make} \
diff --git a/dlm-signals.patch b/dlm-signals.patch
new file mode 100644
index 0000000..9714d30
--- /dev/null
+++ b/dlm-signals.patch
@@ -0,0 +1,19 @@
+diff -dur dlm-3.99.5.orig/dlm_controld/main.c dlm-3.99.5/dlm_controld/main.c
+--- dlm-3.99.5.orig/dlm_controld/main.c 2012-06-21 23:53:56.000000000 +0200
++++ dlm-3.99.5/dlm_controld/main.c 2012-11-02 09:07:56.348243739 +0100
+@@ -1592,6 +1592,15 @@
+ rv = sigaction(SIGTERM, &act, NULL);
+ if (rv < 0)
+ return -rv;
++ rv = sigaction(SIGINT, &act, NULL);
++ if (rv < 0)
++ return -rv;
++
++ memset(&act, 0, sizeof(act));
++ act.sa_handler = SIG_IGN;
++ rv = sigaction(SIGHUP, &act, NULL);
++ if (rv < 0)
++ return -rv;
+
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = sigchld_handler;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dlm.git/commitdiff/97d51e0728de3e9fb5f2a01188d02059dffdff6f
More information about the pld-cvs-commit
mailing list