I am trying to run Qemu on my Mac and I have some difficulties. I am using OS X 10.8.2 and installed Qemu 1.2.50 via their repository.
Update: Just upgraded to Qemu 1.3.50 and the problem is still the same.
When I run
from the command line everything works well and I can terminate execution using Ctrl-C. As soon as I add -vnc :0 however I am no longer able to terminate without killing the process from the Activity Monitor.
My problem is, that I am not just starting Qemu manually from time to time but that I have a Java program that requieres Qemu to perform some task via the vnc protocol, so manual shutdown is not an option.
So basically at some point in my program I start a thread that does:
Runtime rt = Runtime.getRuntime(); process = rt.exec("/usr/local/bin/qemu-system-i386 -vnc :0"); // Some stuff via vnc protocol
At some later point from my main thread I call:
This does not terminate Qemu on OS X. The same code works with Qemu 1.2.0 on Ubuntu 12.10
So I guess my question is how to properly shutdown Qemu with vnc enabled on OS X.
Or maybe I could just try to force-quit the Qemu process like the Activity Manager does?