qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/9] Monitor: Return before exiting with 'quit'


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 5/9] Monitor: Return before exiting with 'quit'
Date: Mon, 26 Apr 2010 15:22:38 -0300

On Mon, 26 Apr 2010 12:49:40 -0500
Anthony Liguori <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]