From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXV06-00034D-V8 for qemu-devel@nongnu.org; Thu, 24 May 2012 06:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXUzz-0008Tu-SP for qemu-devel@nongnu.org; Thu, 24 May 2012 06:10:34 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:62060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXUzz-0008TG-J4 for qemu-devel@nongnu.org; Thu, 24 May 2012 06:10:27 -0400 Received: by eaak12 with SMTP id k12so3172315eaa.4 for ; Thu, 24 May 2012 03:10:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FBE090F.6050708@redhat.com> Date: Thu, 24 May 2012 12:10:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <41561.0733711675$1337845368@news.gmane.org> In-Reply-To: <41561.0733711675$1337845368@news.gmane.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1 v2] Prevent disk data loss when closing qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk Cc: 'qemu-devel' , Anthony Liguori Il 24/05/2012 09:42, Pavel Dovgaluk ha scritto: > Prevent disk data loss when closing qemu console window > under Windows 7. > > Signed-off-by: Pavel Dovgalyuk > --- > os-win32.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/os-win32.c b/os-win32.c > index ad76370..66c39b8 100644 > --- a/os-win32.c > +++ b/os-win32.c > @@ -57,7 +57,11 @@ int setenv(const char *name, const char *value, int overwrite) > > static BOOL WINAPI qemu_ctrl_handler(DWORD type) > { > - exit(STATUS_CONTROL_C_EXIT); > + qemu_system_shutdown_request(); > + /* Windows 7 kills application when the function returns. > + Sleep here to give QEMU a try for closing */ > + Sleep(10000); > + > return TRUE; > } Reviewed-by: Paolo Bonzini Anthony, can you queue it for 1.1? Paolo