This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
master - groupd: fix daemon quit on SIGTERM
- From: David Teigland <teigland at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Wed, 27 Aug 2008 15:16:50 +0000 (UTC)
- Subject: master - groupd: fix daemon quit on SIGTERM
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=32849ba0f7e022ca5de30d043de5fe8c8c7ab982
Commit: 32849ba0f7e022ca5de30d043de5fe8c8c7ab982
Parent: 3a6a90b78d96dff8b2dd40151d253e0935996f4f
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Aug 27 10:04:56 2008 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Aug 27 10:04:56 2008 -0500
groupd: fix daemon quit on SIGTERM
The daemon can quit immediately on SIGTERM if running in LIBCPG mode,
without checking for groups. (The placeholder groups for blocking old
cluster2 groupd's get in the way of checking gd_groups.)
Signed-off-by: David Teigland <teigland@redhat.com>
---
group/daemon/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/group/daemon/main.c b/group/daemon/main.c
index 5339ff8..9f4c88f 100644
--- a/group/daemon/main.c
+++ b/group/daemon/main.c
@@ -781,7 +781,8 @@ static void loop(void)
for (;;) {
rv = poll(pollfd, client_maxi + 1, poll_timeout);
if (rv == -1 && errno == EINTR) {
- if (daemon_quit && list_empty(&gd_groups))
+ if (daemon_quit && (group_mode == GROUP_LIBCPG ||
+ list_empty(&gd_groups)))
goto out;
daemon_quit = 0;
continue;