projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d796321
)
fix crash when closing windows (Frediano Ziglio)
author
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 26 Jun 2006 20:03:44 +0000
(20:03 +0000)
committer
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 26 Jun 2006 20:03:44 +0000
(20:03 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2026
c046a42c
-6fe2-441c-8c8c-
71466251a162
vl.c
patch
|
blob
|
history
diff --git
a/vl.c
b/vl.c
index 51ad671b72555b68e5c7cd4e5b5a1854a05feabd..b01c9b31b7fe5453576fcede370134bceb97fc9b 100644
(file)
--- a/
vl.c
+++ b/
vl.c
@@
-5495,6
+5495,14
@@
static void select_soundhw (const char *optarg)
}
#endif
+#ifdef _WIN32
+static BOOL WINAPI qemu_ctrl_handler(DWORD type)
+{
+ exit(STATUS_CONTROL_C_EXIT);
+ return TRUE;
+}
+#endif
+
#define MAX_NET_CLIENTS 32
int main(int argc, char **argv)
@@
-5534,6
+5542,8
@@
int main(int argc, char **argv)
act.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &act, NULL);
}
+#else
+ SetConsoleCtrlHandler(qemu_ctrl_handler, TRUE);
#endif
init_timers();