From patchwork Thu Oct 22 19:38:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 36743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DDC3B7BB8 for ; Fri, 23 Oct 2009 06:45:36 +1100 (EST) Received: from localhost ([127.0.0.1]:48959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N13bJ-0001gj-IR for incoming@patchwork.ozlabs.org; Thu, 22 Oct 2009 15:45:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N13Wh-0005cN-DK for qemu-devel@nongnu.org; Thu, 22 Oct 2009 15:40:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N13Wc-0005PA-8v for qemu-devel@nongnu.org; Thu, 22 Oct 2009 15:40:46 -0400 Received: from [199.232.76.173] (port=53619 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N13Wc-0005Oq-3c for qemu-devel@nongnu.org; Thu, 22 Oct 2009 15:40:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41990) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N13Wb-0006IW-Bf for qemu-devel@nongnu.org; Thu, 22 Oct 2009 15:40:41 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9MJed7p019339; Thu, 22 Oct 2009 15:40:40 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9MJe41E025742; Thu, 22 Oct 2009 15:40:37 -0400 Received: from amt.cnet (vpn-10-110.str.redhat.com [10.32.10.110]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9MJe39H010765; Thu, 22 Oct 2009 15:40:04 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 85A186814B1; Thu, 22 Oct 2009 17:39:49 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n9MJdlMF020337; Thu, 22 Oct 2009 17:39:47 -0200 Message-Id: <20091022193912.063620036@redhat.com> User-Agent: quilt/0.47-1 Date: Thu, 22 Oct 2009 17:38:17 -0200 From: Marcelo Tosatti To: qemu-devel@nongnu.org References: <20091022193816.147000901@redhat.com> Content-Disposition: inline; filename=block-sigchld X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: glommer@redhat.com, Marcelo Tosatti , aliguori@us.ibm.com Subject: [Qemu-devel] [patch 1/2] qemu: block SIGCHLD in vcpu thread(s) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Otherwise a vcpu thread can run the sigchild handler causing waitpid() from iothread to fail. Signed-off-by: Marcelo Tosatti Index: qemu/vl.c =================================================================== --- qemu.orig/vl.c +++ qemu/vl.c @@ -3722,6 +3722,7 @@ static void block_io_signals(void) sigaddset(&set, SIGUSR2); sigaddset(&set, SIGIO); sigaddset(&set, SIGALRM); + sigaddset(&set, SIGCHLD); pthread_sigmask(SIG_BLOCK, &set, NULL); sigemptyset(&set);