WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] tools/hotplug: locking.sh script: fix

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] tools/hotplug: locking.sh script: fix lock directory remains on error bug
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jul 2010 06:07:09 -0700
Delivery-date: Fri, 16 Jul 2010 06:12:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1279285262 -3600
# Node ID ba3ebe1540ef6e706b97d5fe4133800d9cb9ef4b
# Parent  2267168826f1c8255e75166661ebc57107093764
tools/hotplug: locking.sh script: fix lock directory remains on error bug

_release_lock should be used instead of release_lock.
sigerr is introduced so that it can be redefined by
xen-hotplug-common.sh to a version which writes error status to
xenstore.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
xen-unstable changeset:   21738:473c170bca8d
xen-unstable date:        Tue Jul 06 13:10:14 2010 +0100
---
 tools/hotplug/Linux/locking.sh |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r 2267168826f1 -r ba3ebe1540ef tools/hotplug/Linux/locking.sh
--- a/tools/hotplug/Linux/locking.sh    Fri Jul 16 14:00:36 2010 +0100
+++ b/tools/hotplug/Linux/locking.sh    Fri Jul 16 14:01:02 2010 +0100
@@ -39,6 +39,12 @@ release_lock()
 }
 
 
+# This function will be redefined in xen-hotplug-common.sh.
+sigerr() {
+  exit 1
+}
+
+
 _claim_lock()
 {
   local lockdir="$1"
@@ -47,7 +53,7 @@ _claim_lock()
 
   while [ $retries -lt $LOCK_RETRIES ]
   do
-    mkdir "$lockdir" 2>/dev/null && trap "release_lock $1; sigerr" ERR &&
+    mkdir "$lockdir" 2>/dev/null && trap "_release_lock $lockdir; sigerr" ERR 
&&
       _update_lock_info "$lockdir" && return
 
     local new_owner=$(_lock_owner "$lockdir")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] tools/hotplug: locking.sh script: fix lock directory remains on error bug, Xen patchbot-4.0-testing <=