qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled


From: Alexandre Raymond
Subject: [Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled
Date: Mon, 13 Jun 2011 23:46:31 -0400

This fix effectively blocks, in the main thread, the signals handled
by signalfd or the compatibility signal thread.

This way, such signals are received synchronously in the main thread
through sigfd_handler() instead of triggering the signal handler
directly, asynchronously.

Signed-off-by: Alexandre Raymond <address@hidden>
---
 cpus.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 4ab76f0..b6366b5 100644
--- a/cpus.c
+++ b/cpus.c
@@ -411,6 +411,7 @@ static int qemu_signal_init(void)
         sigaddset(&set, SIGIO);
         sigaddset(&set, SIGALRM);
     }
+    pthread_sigmask(SIG_BLOCK, &set, NULL);
 #endif
 
     sigfd = qemu_signalfd(&set);
-- 
1.7.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]