From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6SxI-0005KG-6Y for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:22:52 -0400 Received: from [140.186.70.92] (port=60431 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6SxG-0005Iw-FW for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6SxE-00032c-NF for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:22:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54691) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6SxE-00032U-Ef for qemu-devel@nongnu.org; Mon, 26 Apr 2010 14:22:48 -0400 Date: Mon, 26 Apr 2010 15:22:38 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 5/9] Monitor: Return before exiting with 'quit' Message-ID: <20100426152238.5ece1c15@redhat.com> In-Reply-To: <4BD5D234.2030508@codemonkey.ws> References: <1272296853-30285-1-git-send-email-lcapitulino@redhat.com> <1272296853-30285-6-git-send-email-lcapitulino@redhat.com> <4BD5D234.2030508@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Mon, 26 Apr 2010 12:49:40 -0500 Anthony Liguori 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.. 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? 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?