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

[Xen-changelog] [xen-3.4-testing] xm: Don't die when trying to conect th

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] xm: Don't die when trying to conect the console to short-lived domains
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Jun 2009 10:26:25 -0700
Delivery-date: Thu, 11 Jun 2009 08:06:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244109527 -3600
# Node ID 11cadcaff051188117eeb103eeaf4fd9dcb14ea9
# Parent  f18a7185e7872ffe7fb6e38d391d3b5af6eb325f
xm: Don't die when trying to conect the console to short-lived domains

As observed by Mick Joran, if short-lived domain exits cleanly
then os.waitpid() will throw the following exception. This appears
to be because the child process that is used to start the domain
has detached from its parent.

OSError: [Errno 10] No child processes

Cc: Mick Jordan <Mick.Jordan@xxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
xen-unstable changeset:   19725:265de5701b82
xen-unstable date:        Thu Jun 04 10:46:13 2009 +0100

xm: Remove redundant os.waitpid() call from do_console()
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   19728:50cf07f42fdd
xen-unstable date:        Thu Jun 04 10:57:39 2009 +0100
---
 tools/python/xen/xm/create.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r f18a7185e787 -r 11cadcaff051 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Jun 04 10:54:40 2009 +0100
+++ b/tools/python/xen/xm/create.py     Thu Jun 04 10:58:47 2009 +0100
@@ -1395,7 +1395,13 @@ def do_console(domain_name):
         for i in range(10):
             # Catch failure of the create process 
             time.sleep(1)
-            (p, rv) = os.waitpid(cpid, os.WNOHANG)
+            try:
+                (p, rv) = os.waitpid(cpid, os.WNOHANG)
+            except OSError:
+                # Domain has started cleanly and then exiting,
+                # the child process used to do this has detached
+                print("Domain has already finished");
+                break
             if os.WIFEXITED(rv):
                 if os.WEXITSTATUS(rv) != 0:
                     sys.exit(os.WEXITSTATUS(rv))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] xm: Don't die when trying to conect the console to short-lived domains, Xen patchbot-3.4-testing <=