From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX5Nh-00067V-Ht for qemu-devel@nongnu.org; Wed, 23 May 2012 02:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX5Nf-0007Kh-CF for qemu-devel@nongnu.org; Wed, 23 May 2012 02:49:13 -0400 Received: from mail.ispras.ru ([83.149.199.43]:33215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX5Nf-0007HS-4y for qemu-devel@nongnu.org; Wed, 23 May 2012 02:49:11 -0400 From: "Pavel Dovgaluk" References: <4fb35a7e.2458b40a.3ed6.649cSMTPIN_ADDED@mx.google.com> <001001cd334c$e8d95260$ba8bf720$@Dovgaluk@ispras.ru> <4FBB5396.2010001@redhat.com> <4FBB5B80.20409@redhat.com> In-Reply-To: <4FBB5B80.20409@redhat.com> Date: Wed, 23 May 2012 10:48:57 +0400 Message-ID: <005f01cd38b0$20d8a180$6289e480$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH] Prevent disk data loss when closing qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , 'Kevin Wolf' Cc: 'dunrong huang' , 'qemu-devel' , 'Anthony Liguori' > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > Il 22/05/2012 10:51, Kevin Wolf ha scritto: > > Am 16.05.2012 12:16, schrieb Pavel Dovgaluk: > >> I use qemu under Windows and it has two windows when executes - console and SDL ones. > >> When I close SDL window main loop function terminates correctly, and when I close > >> console window to terminate qemu then the code after main loop is not executed. > > > > Is there no way to catch this case and use the regular shutdown > > mechanism there as well? > > > > I'm not against your patch and it's probably 1.1 material, but there may > > be more shutdown logic that we're missing if you close the console window. > > Looks like qemu_ctrl_handler (in os-win32.c) needs to do something like > termsig_handler (in os-posix.c) instead of a plain exit. I tried to call qemu_system_shutdown_request() instead of exit() there, but Windows kills qemu before it finishes cleanup work. Pavel Dovgaluk