aboutsummaryrefslogtreecommitdiff
path: root/curses.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-21 20:08:03 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-21 20:08:03 +0000
commit5b08fc106d3146ddc1447d82d4770fc402fc363b (patch)
treefe847d34b59f7c579a4697dea158d530686843be /curses.c
parent6f382b5ec020fea83e0faa409b912135d06c287c (diff)
Handle terminating signals (Gerd Hoffmann)
This patch makes qemu handle signals better. It sets the request_shutdown flag, making the main_loop exit and qemu taking the usual exit route, with atexit handlers being called and so on, instead of qemu just being killed by the signal. To avoid calling vm_start() from the signal handler main_loop() got an additional check so qemu_system_shutdown_request() works even when the vm is in stopped state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5055 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'curses.c')
-rw-r--r--curses.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/curses.c b/curses.c
index d09eff256b..96b6e49332 100644
--- a/curses.c
+++ b/curses.c
@@ -350,8 +350,6 @@ void curses_display_init(DisplayState *ds, int full_screen)
atexit(curses_atexit);
#ifndef _WIN32
- signal(SIGINT, SIG_DFL);
- signal(SIGQUIT, SIG_DFL);
#if defined(SIGWINCH) && defined(KEY_RESIZE)
/* some curses implementations provide a handler, but we
* want to be sure this is handled regardless of the library */