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-devel

[Xen-devel] [PATCH] Allow xm to spawn vnc viewer

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Allow xm to spawn vnc viewer
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 1 Aug 2008 17:20:00 +0100
Delivery-date: Fri, 01 Aug 2008 09:21:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18576.34323.334465.122513@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <18576.34323.334465.122513@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I wrote:
> The new merged qemu no longer has the ability to spawn a vnc viewer
> process in the bowels of the xend/qemu stack.  In this patch we
> provide support for this use case in a different manner - one more
> akin to the mechanism used for `xm console' and `xm create -c'.

I see that I made a small mistake in this patch in the exception
handling, which tends to cause the viewer to inherit a signal handler.

The attached patch fixes this up.

Apologies,
Ian.

diff -r 8951c3b84e2a tools/python/xen/xm/console.py
--- a/tools/python/xen/xm/console.py    Fri Aug 01 09:54:54 2008 +0100
+++ b/tools/python/xen/xm/console.py    Fri Aug 01 14:40:28 2008 +0100
@@ -40,14 +40,12 @@ class OurXenstoreConnection:
             while True:
                 result = self.handle.read('0', path)
                 if result is not None:
+                    signal.alarm(0)
                     return result
                 self.handle.read_watch()
-            self.handle.unwatch(path, watch)
-            signal.alarm(0)
-        except:
+        finally:
             signal.alarm(0)
             if watch is not None: self.handle.unwatch(path, watch)
-            raise
     def read_maybe(self, path):
         return self.handle.read('0', path)
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Allow xm to spawn vnc viewer, Ian Jackson <=