ia64/xen-unstable

changeset 5851:edc6e8921dd1

Don't leave behind zombie device model processes

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jul 25 21:01:57 2005 +0000 (2005-07-25)
parents 3acc0ae6a001
children cb0f79c9d3fc
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Mon Jul 25 21:01:42 2005 +0000
     1.2 +++ b/tools/python/xen/xend/image.py	Mon Jul 25 21:01:57 2005 +0000
     1.3 @@ -352,8 +352,9 @@ class VmxImageHandler(ImageHandler):
     1.4  
     1.5      def destroy(self):
     1.6          channel.eventChannelClose(self.device_channel)
     1.7 -        os.system("kill -KILL"
     1.8 -                + " %d" % self.pid)
     1.9 +        import signal
    1.10 +        os.kill(self.pid, signal.SIGKILL)
    1.11 +        (pid, status) = os.waitpid(self.pid, 0)
    1.12  
    1.13      def getDomainMemory(self, mem_mb):
    1.14          return (mem_mb * 1024) + self.getPageTableSize(mem_mb)