always call SDL_Quit
PATCH 1/1 always call SDL_Quit
When qemu-dm is using SDL and has the mouse captured, a "xm destroy" of the VM will cause control of the mouse to be lost. This happens because the qemu-dm is killed with SIGKILL, so atexit doesn't run, so SDL_Quit doesn't run. Other things could go wrong too -- for example, if the VM was fullscreen, the video mode probably wouldn't be reset either.
There was a discussion a few years ago on the SDL mailing list regarding the ramifications of not calling SDL_Quit. In short, you don't want to skip it:
http://www.libsdl.org/pipermail/sdl/2004-May/062400.html
The attached patch sends a SIGTERM instead of SIGKILL. I've been using a variation of this patch since our SLES 10 betas, and I've never seen a case where SIGKILL was actually needed.
Please apply.
tools/python/xen/xend/image.py +1 -1
@@ -412,7 +412,7 @@ class HVMImageHandler(ImageHandler): import signal if not self.pid: return - os.kill(self.pid, signal.SIGKILL) + os.kill(self.pid, signal.SIGTERM) os.waitpid(self.pid, 0) self.pid = 0
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel