aboutsummaryrefslogtreecommitdiff
path: root/main-loop.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2014-10-27 14:13:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-10-27 15:05:09 +0000
commit3e9418e160cd8901c83a3c88967158084f5b5c03 (patch)
tree5ebdae60d4e7b6ce756dd99c1759b57183f10a4b /main-loop.c
parent817ef04db2cfa2df04daffd6917f4ea7605f6403 (diff)
Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously"
This reverts commit 15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks debuggability of qemu and is no longer needed as the problem has now been addressed in a different way. Instead we provide a comment about why these signals must be handled asynchronously. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> [PMM: added comment] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'main-loop.c')
-rw-r--r--main-loop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main-loop.c b/main-loop.c
index d2e64f1fa4..981bcb5f8e 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -84,9 +84,11 @@ static int qemu_signal_init(void)
sigaddset(&set, SIGIO);
sigaddset(&set, SIGALRM);
sigaddset(&set, SIGBUS);
- sigaddset(&set, SIGINT);
- sigaddset(&set, SIGHUP);
- sigaddset(&set, SIGTERM);
+ /* SIGINT cannot be handled via signalfd, so that ^C can be used
+ * to interrupt QEMU when it is being run under gdb. SIGHUP and
+ * SIGTERM are also handled asynchronously, even though it is not
+ * strictly necessary, because they use the same handler as SIGINT.
+ */
pthread_sigmask(SIG_BLOCK, &set, NULL);
sigdelset(&set, SIG_IPI);