From: Ian Jackson Subject: [PATCH] Allow xm to spawn vnc viewer Date: Fri, 1 Aug 2008 17:20:00 +0100 Message-ID: <18579.14256.901121.927549@mariner.uk.xensource.com> References: <18576.34323.334465.122513@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6BwqRnrCYU" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18576.34323.334465.122513@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --6BwqRnrCYU Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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. --6BwqRnrCYU Content-Type: text/plain Content-Description: vnc viewer launch correct exception/signal handling Content-Disposition: inline; filename="xm-vncviewer-fix.patch" Content-Transfer-Encoding: 7bit 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) --6BwqRnrCYU Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --6BwqRnrCYU--