From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6lDl-0002de-VV for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:53:06 -0400 Received: from [140.186.70.92] (port=35106 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6lDg-0002bR-Of for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:53:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6lDf-0007gs-4J for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:53:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33924) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6lDe-0007gg-T3 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:52:59 -0400 Message-ID: <4BD6EC35.5060106@redhat.com> Date: Tue, 27 Apr 2010 15:52:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1272296853-30285-1-git-send-email-lcapitulino@redhat.com> <1272296853-30285-6-git-send-email-lcapitulino@redhat.com> <4BD5D234.2030508@codemonkey.ws> <20100426152238.5ece1c15@redhat.com> <4BD5DAA2.4050206@codemonkey.ws> <20100426155303.2c381ff7@redhat.com> <4BD5E2BB.8000105@codemonkey.ws> <4BD5E51A.9070402@web.de> <4BD5E5E4.8000609@codemonkey.ws> <20100426164448.679a4d19@redhat.com> <4BD6CFFD.6070308@redhat.com> <20100427102008.3424527c@redhat.com> In-Reply-To: <20100427102008.3424527c@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 5/9] Monitor: Return before exiting with 'quit' List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Jan Kiszka , qemu-devel@nongnu.org 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