This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]