From: "Andreas Färber" <afaerber@suse.de>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: 'qemu-devel' <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH v2] Prevent disk data loss when closing qemu
Date: Thu, 24 May 2012 14:49:34 +0200 [thread overview]
Message-ID: <4FBE2E5E.6010107@suse.de> (raw)
In-Reply-To: <002901cd3980$b8d4e6d0$2a7eb470$@Dovgaluk@ispras.ru>
Am 24.05.2012 09:42, schrieb Pavel Dovgaluk:
> 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);
How do we know that 10000 is enough? Shouldn't we rather block until
receipt of some completion signal?
Andreas
> +
> return TRUE;
> }
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-05-24 12:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 7:42 [Qemu-devel] [PATCH v2] Prevent disk data loss when closing qemu Pavel Dovgaluk
2012-05-24 12:49 ` Andreas Färber [this message]
2012-05-24 13:46 ` Paolo Bonzini
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=4FBE2E5E.6010107@suse.de \
--to=afaerber@suse.de \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--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).