]> git.pld-linux.org Git - packages/xen.git/blame - xen-scripts-locking.patch
- added librt patch (qemu build fix for glibc 2.17)
[packages/xen.git] / xen-scripts-locking.patch
CommitLineData
30059e8d
JK
1commit a4ef9c9753467ae2eaeff858bcb63a5ba5337d18
2Author: Jacek Konieczny <jajcus@jajcus.net>
3Date: Fri Nov 9 14:47:40 2012 +0100
4
5 Fix locking in tools/hotplug/Linux/locking.sh
6
7 The claim_lock() function would fail in the perl code with:
8
9 Invalid argument at -e line 2.
10
11 because the Perl snippet opens for reading the file descriptor, which
12 was earlier opened for write (append).
13
14 Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
15
16diff --git a/tools/hotplug/Linux/locking.sh b/tools/hotplug/Linux/locking.sh
17index 0e2a531..5c4f365 100644
18--- a/tools/hotplug/Linux/locking.sh
19+++ b/tools/hotplug/Linux/locking.sh
20@@ -44,7 +44,7 @@ claim_lock()
21 # See below for a correctness proof.
22 local rightfile
23 while true; do
24- eval "exec $_lockfd>>$_lockfile"
25+ eval "exec $_lockfd<>$_lockfile"
26 flock -x $_lockfd || return $?
27 # We can't just stat /dev/stdin or /proc/self/fd/$_lockfd or
28 # use bash's test -ef because those all go through what is
This page took 0.050085 seconds and 4 git commands to generate.