public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - cman: fix error if corosync takes >1s to start up Date: Thu, 13 Aug 2009 13:54:00 -0000 [thread overview] Message-ID: <20090813135430.4E9B0120202@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ce1d15f96aed3e37872d9f8e1d6e70aa0865f7e4 Commit: ce1d15f96aed3e37872d9f8e1d6e70aa0865f7e4 Parent: 99b2899ede7e9b0b4b7429de58397f55786bac4a Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Thu Aug 13 14:52:58 2009 +0100 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Thu Aug 13 14:52:58 2009 +0100 cman: fix error if corosync takes >1s to start up If corosync takes too long to start up then cman_tool quits with an error saying that it didn't start. This fixes that by correcting the abuses of the select return status. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/cman_tool/join.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c index 78c400e..7d9a1dc 100644 --- a/cman/cman_tool/join.c +++ b/cman/cman_tool/join.c @@ -265,7 +265,7 @@ int join(commandline_t *comline, char *main_envp[]) if (sscanf(messageptr, "FORKED: %d", &corosync_pid) == 1) { if (comline->verbose & DEBUG_STARTUP_ONLY) fprintf(stderr, "forked process ID is %d\n", corosync_pid); - status = 1; + status = 0; /* There might be a SUCCESS or error message in the pipe too. */ messageptr = strchr(messageptr, '\n'); @@ -278,7 +278,6 @@ int join(commandline_t *comline, char *main_envp[]) if (sscanf(messageptr, "SUCCESS: %d", &corosync_pid) == 1) { if (comline->verbose & DEBUG_STARTUP_ONLY) fprintf(stderr, "corosync running, process ID is %d\n", corosync_pid); - status = 0; break; } else if (messageptr) { @@ -294,7 +293,7 @@ int join(commandline_t *comline, char *main_envp[]) } } - } while (status != 0); + } while (status == 0); close(p[0]); /* If corosync has started, try to connect to cman ... if it's still there */
reply other threads:[~2009-08-13 13:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090813135430.4E9B0120202@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).