From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Sharma Subject: [PATCH][2/9] Don't leave behind zombie device model processes Date: Mon, 25 Jul 2005 14:00:50 -0700 Message-ID: <20050725210050.GA24294@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Don't leave behind zombie device model processes Signed-off-by: Edwin Zhai Signed-off-by: Arun Sharma diff -r 70b6d0307a45 -r c8178e8ff103 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Thu Jul 14 17:28:24 2005 +++ b/tools/python/xen/xend/image.py Thu Jul 14 20:22:54 2005 @@ -352,8 +352,9 @@ def destroy(self): channel.eventChannelClose(self.device_channel) - os.system("kill -KILL" - + " %d" % self.pid) + import signal + os.kill(self.pid, signal.SIGKILL) + (pid, status) = os.waitpid(self.pid, 0) def getDomainMemory(self, mem_mb): return (mem_mb * 1024) + self.getPageTableSize(mem_mb)