From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Cman: Handle INT and TERM signals correctly
Date: Thu, 06 Jan 2011 11:42:17 +0100 [thread overview]
Message-ID: <4D259C89.5080109@redhat.com> (raw)
In-Reply-To: <1294310291-6223-1-git-send-email-fdinitto@redhat.com>
Re-iterating the patch for ACK to go in RHEL6.
Fabio
On 1/6/2011 11:38 AM, Fabio M. Di Nitto wrote:
> From: Jan Friesse <jfriesse@redhat.com>
>
> Corosync signal handler (SIGINT and SIGTERM) is replaced by cman one,
> and this was settting quit_threads to 1. Regular cman shutdown sequence
> (cman_tool leave) tests if quit_threads is set or not. If so, it refuses
> continue so it was not possible to cleanly leave cluster.
>
> Now SIGINT and SIGTERM are ignored, and (un)intentional kill of corosync
> is no longer problem.
>
> Resolves: rhbz#617234
> ---
> cman/daemon/daemon.c | 11 ++---------
> 1 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/cman/daemon/daemon.c b/cman/daemon/daemon.c
> index 64607cc..92cfd47 100644
> --- a/cman/daemon/daemon.c
> +++ b/cman/daemon/daemon.c
> @@ -489,11 +489,6 @@ int num_listeners(void)
> return count;
> }
>
> -static void sigint_handler(int ignored)
> -{
> - quit_threads = 1;
> -}
> -
> int cman_init(struct corosync_api_v1 *api)
> {
> int fd;
> @@ -514,12 +509,10 @@ int cman_init(struct corosync_api_v1 *api)
> return -2;
>
> /* Shutdown trap */
> - sa.sa_handler = sigint_handler;
> - sigaction(SIGINT, &sa, NULL);
> - sigaction(SIGTERM, &sa, NULL);
> -
> sa.sa_handler = SIG_IGN;
> sigaction(SIGPIPE, &sa, NULL);
> + sigaction(SIGINT, &sa, NULL);
> + sigaction(SIGTERM, &sa, NULL);
>
> return 0;
> }
prev parent reply other threads:[~2011-01-06 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 10:38 [Cluster-devel] [PATCH] Cman: Handle INT and TERM signals correctly Fabio M. Di Nitto
2011-01-06 10:42 ` Fabio M. Di Nitto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D259C89.5080109@redhat.com \
--to=fdinitto@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).