diff mbox

[3/6] kvm tools: Block SIGALRM for theadpool thread

Message ID 1308156491-18488-3-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He June 15, 2011, 4:48 p.m. UTC
thread pool thread is not interested in SIGALRM as well.

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/threadpool.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/threadpool.c b/tools/kvm/threadpool.c
index 2db02184..fbd4887 100644
--- a/tools/kvm/threadpool.c
+++ b/tools/kvm/threadpool.c
@@ -5,6 +5,7 @@ 
 #include <linux/list.h>
 #include <pthread.h>
 #include <stdbool.h>
+#include <signal.h>
 
 struct thread_pool__job {
 	kvm_thread_callback_fn_t	callback;
@@ -85,6 +86,9 @@  static void thread_pool__threadfunc_cleanup(void *param)
 
 static void *thread_pool__threadfunc(void *param)
 {
+
+	sig_block(SIGALRM);
+
 	pthread_cleanup_push(thread_pool__threadfunc_cleanup, NULL);
 
 	for (;;) {