From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31052 invoked by alias); 16 Mar 2009 22:02:48 -0000 Received: (qmail 30953 invoked by alias); 16 Mar 2009 22:02:48 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: fence: master - fenced: fix lockfile To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: fence.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 0d0d4115d32e71f6c418ab040e86d2d377d792e7 X-Git-Newrev: d3b33ac0f2afa8c44dc3c7fd5dee6a4f769eb409 From: David Teigland Message-Id: <20090316220224.5EA6F1201FC@lists.fedorahosted.org> Date: Mon, 16 Mar 2009 22:02:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00799.txt.bz2 Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=d3b33ac0f2afa8c44dc3c7fd5dee6a4f769eb409 Commit: d3b33ac0f2afa8c44dc3c7fd5dee6a4f769eb409 Parent: 0d0d4115d32e71f6c418ab040e86d2d377d792e7 Author: David Teigland AuthorDate: Mon Mar 16 16:58:14 2009 -0500 Committer: David Teigland CommitterDate: Mon Mar 16 16:58:14 2009 -0500 fenced: fix lockfile fenced was taking a lock on its lockfile before forking, but forking clears the locks, so it needs to happen after the fork. Signed-off-by: David Teigland --- fence/fenced/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fence/fenced/main.c b/fence/fenced/main.c index ddba022..9096c7c 100644 --- a/fence/fenced/main.c +++ b/fence/fenced/main.c @@ -971,7 +971,6 @@ int main(int argc, char **argv) INIT_LIST_HEAD(&controlled_entries); read_arguments(argc, argv); - lockfile(); if (!daemon_debug_opt) { if (daemon(0, 0) < 0) { @@ -980,6 +979,7 @@ int main(int argc, char **argv) } umask(0); } + lockfile(); init_logging(); log_level(LOG_INFO, "fenced %s", RELEASE_VERSION); signal(SIGTERM, sigterm_handler);