[et-mgmt-tools] [PATCH] Ignore failures to kill the child console process

John Levon john.levon at sun.com
Tue Mar 17 02:45:56 UTC 2009


# HG changeset patch
# User John Levon <john.levon at sun.com>
# Date 1237257954 25200
# Node ID 0eeb1929a03b7667bffe55fed53f9546f81c736e
# Parent  7e7e8034601323d1b4f21314e0ccf520e25d51b6
Ignore failures to kill the child console process

For example, it may have quit already.

Signed-off-by: John Levon <john.levon at sun.com>

diff --git a/virtinst/Guest.py b/virtinst/Guest.py
--- a/virtinst/Guest.py
+++ b/virtinst/Guest.py
@@ -772,7 +772,10 @@ class Guest(object):
 
     def terminate_console(self):
         if self._consolechild:
-            os.kill(self._consolechild, signal.SIGKILL)
+            try:
+                os.kill(self._consolechild, signal.SIGKILL)
+            except:
+                pass
 
 def _wait_for_domain(conn, name):
     # sleep in .25 second increments until either a) we get running




More information about the et-mgmt-tools mailing list