From: Mark Williamson Subject: [PATCH][TOOLS] Start xentop using os.system Date: Tue, 11 Dec 2007 01:05:04 +0000 Message-ID: <200712110105.05374.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_BJeXHVot1RKx8JM" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_BJeXHVot1RKx8JM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Start xentop using os.system instead of an exec call. No functional difference for "xm top" (other than the fact that the python interpreter hangs around longer) but avoids "xm shell" exiting when you quit from xentop - more shell-like behaviour. Should be good for 3.2. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! --Boundary-00=_BJeXHVot1RKx8JM Content-Type: all/allfiles; name="xm-top-use-os-system.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xm-top-use-os-system.patch" # HG changeset patch # User mark.williamson@cl.cam.ac.uk # Date 1197327985 0 # Node ID 8c46810ad1abd51f3f42c4c1149c26e6d462368f # Parent e1f1250c1d2c34f3a1908753c1752e7ec65b36a9 [TOOLS] Use os.system instead of exec to start xentop. This makes no difference to the visible behaviour of "xm top" but avoids the whole of xm from quitting if you're in "xm shell". This provides the more intuitive behaviour of returning to the xm shell interface after leaving xm top. Signed-off-by: Mark Williamson Signed-off-by: Mark Williamson diff -r e1f1250c1d2c -r 8c46810ad1ab tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Sun Dec 09 01:48:24 2007 +0000 +++ b/tools/python/xen/xm/main.py Mon Dec 10 23:06:25 2007 +0000 @@ -1832,7 +1832,7 @@ def xm_top(args): def xm_top(args): arg_check(args, "top", 0) - os.execvp('xentop', ['xentop']) + os.system('xentop') def xm_dmesg(args): arg_check(args, "dmesg", 0, 1) --Boundary-00=_BJeXHVot1RKx8JM 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 --Boundary-00=_BJeXHVot1RKx8JM--