From: Asias He Subject: [PATCH 3/6] kvm tools: Block SIGALRM for theadpool thread Date: Thu, 16 Jun 2011 00:48:08 +0800 Message-ID: <1308156491-18488-3-git-send-email-asias.hejun@gmail.com> References: <1308156491-18488-1-git-send-email-asias.hejun@gmail.com> Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He To: Pekka Enberg Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:61786 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305Ab1FOQux (ORCPT ); Wed, 15 Jun 2011 12:50:53 -0400 Received: by mail-pz0-f46.google.com with SMTP id 9so395991pzk.19 for ; Wed, 15 Jun 2011 09:50:53 -0700 (PDT) In-Reply-To: <1308156491-18488-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: thread pool thread is not interested in SIGALRM as well. Signed-off-by: Asias He --- tools/kvm/threadpool.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) 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 #include #include +#include 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 (;;) { -- 1.7.5.4