On Mon, 26 Apr 2010 12:49:40 -0500
Anthony Liguori <anth...@codemonkey.ws> wrote:

> On 04/26/2010 10:47 AM, Luiz Capitulino wrote:
> > The 'quit' Monitor command (implemented by do_quit()) calls
> > exit() directly, this is problematic under QMP because QEMU
> > exits before having a chance to send the ok response.
> >
> > Clients don't know if QEMU exited because of a problem or
> > because the 'quit' command has been executed.
> >
> > This commit fixes that by moving the exit() call to the main
> > loop, so that do_quit() requests the system to quit, instead
> > of calling exit() directly.
> >    
> 
> Does this also have the effect of printing out a (qemu) prompt after 
> quit before an EOF appears on that socket?

 Ah, right..

 So, the easiest way to fix this is:

if (user monitor) {
   exit(0);
} else {
   go through main;
}

 And, wrt to the pull, assuming you like the other patches, what's the best for 
you?

 Should I just drop this patch and ask you to pull again or can I do the fix,
rebase, send it in this thread, and ping you?


Reply via email to