make sure we stop the thread if qemu's stderr is gone