]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax error "Bad fd number" when stopping libvirt-guests
authorLaurent Léonard <laurent@open-minds.org>
Sun, 5 Dec 2010 17:53:26 +0000 (18:53 +0100)
committerEric Blake <eblake@redhat.com>
Mon, 6 Dec 2010 18:01:36 +0000 (11:01 -0700)
When libvirt-guests is being stopped, I get the following message:
$Running guests on default URI: test-vm
$Suspending guests on default URI...
$Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd
number

AUTHORS
tools/libvirt-guests.init.in

diff --git a/AUTHORS b/AUTHORS
index ca2414c03338ef1e0abf1edbd0d3cf2c58046d8b..93f3ced82bf0f3b94e5888a572d62a594946ade1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -137,6 +137,7 @@ Patches have also been contributed by:
   Kamezawa Hiroyuki    <kamezawa.hiroyu@jp.fujitsu.com>
   Wen Congyang         <wency@cn.fujitsu.com>
   Hu Tao               <hutao@cn.fujitsu.com>
+  Laurent Léonard      <laurent@open-minds.org>
 
   [....send patches to get your name here....]
 
index 4e0682d996b3fe4de07ff3e33e1c3f3007d18dcc..76dc6279044aeacda40a59fb142dccefb0706db0 100644 (file)
@@ -177,7 +177,7 @@ suspend_guest()
     virsh_pid=$!
     while true; do
         sleep 1
-        kill -0 $virsh_pid >&/dev/null || break
+        kill -0 $virsh_pid >/dev/null 2>&1 || break
         progress=$(run_virsh_c $uri domjobinfo $guest 2>/dev/null | \
                    awk '/^Data processed:/{print $3, $4}')
         if [ -n "$progress" ]; then