Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O48py-0002cj-Ex for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:29:42 -0400 Received: from [140.186.70.92] (port=57729 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O48pw-0002aH-0g for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O48pu-0005Fp-Lo for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:29:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48434) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O48pu-0005FY-EU for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:29:38 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3K8TaoW003266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 04:29:36 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] Monitor: Return before exiting with 'quit' References: <20100407153015.02aaf5d8@redhat.com> Date: Tue, 20 Apr 2010 10:29:34 +0200 In-Reply-To: <20100407153015.02aaf5d8@redhat.com> (Luiz Capitulino's message of "Wed, 7 Apr 2010 15:30:15 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > 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. Yes, that needs fixing. > 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. Matches how system_reset and system_powerdown work. Looks good to me.