From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6kif-0001oE-AK for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:20:57 -0400 Received: from [140.186.70.92] (port=44605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6kiU-0001ZG-9L for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6ki0-0002OU-Rt for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:20:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1715) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6ki0-0002OM-KR for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:20:16 -0400 Date: Tue, 27 Apr 2010 10:20:08 -0300 From: Luiz Capitulino Message-ID: <20100427102008.3424527c@redhat.com> In-Reply-To: <4BD6CFFD.6070308@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Paolo Bonzini Cc: Jan Kiszka , qemu-devel@nongnu.org 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. I will send a patch if there are no objections. > 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?