|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hotplug/Linux: Fix locking in tools/hotplug/Linux/locking.sh
# HG changeset patch
# User Jacek Konieczny <jajcus@xxxxxxxxxx>
# Date 1352888668 0
# Node ID 92c52eb4b2703e265c4a7898cf6166b6517848c7
# Parent 8b93ac0c93f3fb8a140b4688ba71841ac927d4e3
hotplug/Linux: Fix locking in tools/hotplug/Linux/locking.sh
The claim_lock() function would fail in the perl code with:
Invalid argument at -e line 2.
because the Perl snippet opens for reading the file descriptor, which
was earlier opened for write (append).
Signed-off-by: Jacek Konieczny <jajcus@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 8b93ac0c93f3 -r 92c52eb4b270 tools/hotplug/Linux/locking.sh
--- a/tools/hotplug/Linux/locking.sh Tue Nov 13 11:19:17 2012 +0000
+++ b/tools/hotplug/Linux/locking.sh Wed Nov 14 10:24:28 2012 +0000
@@ -44,7 +44,7 @@ claim_lock()
# See below for a correctness proof.
local rightfile
while true; do
- eval "exec $_lockfd>>$_lockfile"
+ eval "exec $_lockfd<>$_lockfile"
flock -x $_lockfd || return $?
# We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or
# use bash's test -ef because those all go through what is
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |