qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 5/9] Monitor: Return before exiting with 'quit'
Date: Tue, 27 Apr 2010 15:52:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

On 04/27/2010 03:20 PM, Luiz Capitulino wrote:
On Tue, 27 Apr 2010 13:52:29 +0200 Paolo Bonzini  wrote:
On 04/26/2010 09:44 PM, Luiz Capitulino wrote:
+    qemu_system_exit_request();

Untested suggestion: why add qemu_system_exit_request, exit_requested,
and a hook in the main loop?  You can do instead

     no_shutdown = 0;
     qemu_system_shutdown_request();

which will actually call quit_timers() and net_cleanup() properly unlike
a blind exit(0).

  Hm, this looks good. It has the side effect of emitting the SHUTDOWN
event, but maybe this is even desirable.

Exactly.

Alternatively, just give an error when "quit"-ting from QMP and keep the
current behavior for non-QMP.  This way you do not provide two ways to
do the same thing.  People will have to avoid -no-shutdown (I don't see
how it is useful from QMP) and they will be able to use the "shutdown"
monitor command.

  Not sure if I got you here, why should we return an error?

Because quit looks like a useless duplicate of shutdown in QMP scenarios. (As long as you do not pass -no-shutdown; but I don't see why a management app should).

Paolo




reply via email to

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