Commit 3587d7e6 authored by bellard's avatar bellard
Browse files

fix crash when closing windows (Frediano Ziglio)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2026 c046a42c-6fe2-441c-8c8c-71466251a162
parent d796321b
...@@ -5495,6 +5495,14 @@ static void select_soundhw (const char *optarg) ...@@ -5495,6 +5495,14 @@ static void select_soundhw (const char *optarg)
} }
#endif #endif
#ifdef _WIN32
static BOOL WINAPI qemu_ctrl_handler(DWORD type)
{
exit(STATUS_CONTROL_C_EXIT);
return TRUE;
}
#endif
#define MAX_NET_CLIENTS 32 #define MAX_NET_CLIENTS 32
int main(int argc, char **argv) int main(int argc, char **argv)
...@@ -5534,6 +5542,8 @@ int main(int argc, char **argv) ...@@ -5534,6 +5542,8 @@ int main(int argc, char **argv)
act.sa_handler = SIG_IGN; act.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &act, NULL); sigaction(SIGPIPE, &act, NULL);
} }
#else
SetConsoleCtrlHandler(qemu_ctrl_handler, TRUE);
#endif #endif
init_timers(); init_timers();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment