summaryrefslogtreecommitdiffstats
path: root/os-win32.c
diff options
context:
space:
mode:
authorAnthony Liguori2012-06-18 17:34:59 +0200
committerAnthony Liguori2012-06-18 17:34:59 +0200
commit0b0cb9d310edfe2b2d108f18be4f013a1e552cfd (patch)
tree895e26169ccbcbeb7e7c40eaecb353dadd7afb21 /os-win32.c
parentMerge remote-tracking branch 'mst/tags/for_anthony' into staging (diff)
parentqemu-iotests: add 036 autoclear feature bit test (diff)
downloadqemu-0b0cb9d310edfe2b2d108f18be4f013a1e552cfd.tar.gz
qemu-0b0cb9d310edfe2b2d108f18be4f013a1e552cfd.tar.xz
qemu-0b0cb9d310edfe2b2d108f18be4f013a1e552cfd.zip
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony: (39 commits) qemu-iotests: add 036 autoclear feature bit test qemu-iotests: add qcow2.py set-feature-bit command fdc-test: introduced qtest read_without_media fdc: fix implied seek while there is no media in drive qcow2: fix autoclear image header update xen: Don't peek behind the BlockDriverState abstraction xen: Don't change -drive if=xen device name during machine init block: Replace bdrv_get_format() by bdrv_get_format_name() qemu-img: document qed format on qemu-img man page qemu-iotests: COW with many AIO requests on the same cluster qemu-iotests: Some backing file COW tests qcow2: Fix avail_sectors in cluster allocation code qcow2: Simplify calculation for COW area at the end qcow2: always operate caches in writeback mode ide: support enable/disable write cache block: always open drivers in writeback mode block: add bdrv_set_enable_write_cache block: copy enable_write_cache in bdrv_append savevm: flush after saving vm state block: flush in writethrough mode after writes ...
Diffstat (limited to 'os-win32.c')
-rw-r--r--os-win32.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/os-win32.c b/os-win32.c
index ad76370c7c..13892ba320 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -57,7 +57,13 @@ 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 period is 10000ms because Windows kills the program
+ after 10 seconds anyway. */
+ Sleep(10000);
+
return TRUE;
}