[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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.


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.unwatch(path, watch)
-            signal.alarm(0)
-        except:
+        finally:
             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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.