From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX5bK-0002c7-Bm for qemu-devel@nongnu.org; Wed, 23 May 2012 03:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX5bE-0005Wc-1d for qemu-devel@nongnu.org; Wed, 23 May 2012 03:03:17 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX5bD-0005Vy-Pc for qemu-devel@nongnu.org; Wed, 23 May 2012 03:03:11 -0400 Received: by pbbro12 with SMTP id ro12so11344215pbb.4 for ; Wed, 23 May 2012 00:03:09 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FBC8BA5.8090409@redhat.com> Date: Wed, 23 May 2012 09:03:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4fb35a7e.2458b40a.3ed6.649cSMTPIN_ADDED@mx.google.com> <001001cd334c$e8d95260$ba8bf720$@Dovgaluk@ispras.ru> <4FBB5396.2010001@redhat.com> <4FBB5B80.20409@redhat.com> <3123.31610261953$1337755763@news.gmane.org> In-Reply-To: <3123.31610261953$1337755763@news.gmane.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Pavel Dovgaluk Cc: 'Kevin Wolf' , 'Anthony Liguori' , 'qemu-devel' , 'dunrong huang' Il 23/05/2012 08:48, Pavel Dovgaluk ha scritto: >>> > > 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. Uff... http://stackoverflow.com/questions/3640633/c-setconsolectrlhandler-routine-issue says more or less what you have to do. Paolo