From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Cc: 'qemu-devel' <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH 1.1 v2] Prevent disk data loss when closing qemu
Date: Thu, 24 May 2012 12:10:23 +0200 [thread overview]
Message-ID: <4FBE090F.6050708@redhat.com> (raw)
In-Reply-To: <41561.0733711675$1337845368@news.gmane.org>
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 <pavel.dovgaluk@gmail.com>
> ---
> 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 <pbonzini@redhat.com>
Anthony, can you queue it for 1.1?
Paolo
next parent reply other threads:[~2012-05-24 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <41561.0733711675$1337845368@news.gmane.org>
2012-05-24 10:10 ` Paolo Bonzini [this message]
2012-05-24 13:11 ` [Qemu-devel] [PATCH 1.1 v2] Prevent disk data loss when closing qemu Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FBE090F.6050708@redhat.com \
--to=pbonzini@redhat.com \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).