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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 5/9] Monitor: Return before exiting with 'quit'
Date: Mon, 26 Apr 2010 13:25:38 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 04/26/2010 01:22 PM, Luiz Capitulino wrote:
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..

It's not necessarily a bad thing if it does. I just wanted to raise that because it's possible that someone depends on the behavior.

I'm not sure it matters to me if we change this behavior though.

  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?

I'm happy to pull it, just wanted to see fi this issue was considered before I did.

Regards,

Anthony Liguori

  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]