]> git.pld-linux.org Git - packages/xen.git/blob - xen-scripts-locking.patch
- added librt patch (qemu build fix for glibc 2.17)
[packages/xen.git] / xen-scripts-locking.patch
1 commit a4ef9c9753467ae2eaeff858bcb63a5ba5337d18
2 Author: Jacek Konieczny <jajcus@jajcus.net>
3 Date:   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
16 diff --git a/tools/hotplug/Linux/locking.sh b/tools/hotplug/Linux/locking.sh
17 index 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.335756 seconds and 3 git commands to generate.