From patchwork Mon May 26 07:19:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 30919 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0FBFF20491 for ; Mon, 26 May 2014 07:21:30 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id l6sf40468479oag.11 for ; Mon, 26 May 2014 00:21:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=UsVmukDkbz8cdWwPoVK79oA4RDiCCZIcpboPop8WWoA=; b=Z/KX7S0mNaTtYjgD2i3XyH82kpTjPmoOtcoWyicvtMRChoNLMwmzXNFUHJQw2WkgWq 8uRm1RX9VjF3a1B79FOncw+b1T0rXbRJMeAtgAx6nI6UvwisTWergn2G3fFUQlWCJ3Ad Hq3vGSfRjtaW3v03ZWQnsPUa+V1rTIiOLquDLiVbuYpTk4zFHoEReUcm5KlxDJ+Dkn62 3fOK5nE/SnJmGssKkuGeW3vGs7MUmA63suYyqFe7jVpO6gPpMNsHXHQ2Yq/uCpeKcVGv HSZoCk+XArZ3w2XRfGTKZIrYlLf+kYxzfEzpVMdhHFglCSc0Gl6L8ByH/z2icZHcamop zpgA== X-Gm-Message-State: ALoCoQkJO9MWvSgYwr8pBbmUmyCbplFKcKdEHBcXeFtz7FN/PArHuLVb9H5oB5IWtWVdM0/OWruG X-Received: by 10.182.226.166 with SMTP id rt6mr9766266obc.47.1401088890614; Mon, 26 May 2014 00:21:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.14 with SMTP id o14ls2524709qgo.63.gmail; Mon, 26 May 2014 00:21:30 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr19242076vev.7.1401088890477; Mon, 26 May 2014 00:21:30 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id w3si5860103vem.39.2014.05.26.00.21.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 May 2014 00:21:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id la4so8845584vcb.13 for ; Mon, 26 May 2014 00:21:30 -0700 (PDT) X-Received: by 10.220.89.4 with SMTP id c4mr116082vcm.53.1401088890402; Mon, 26 May 2014 00:21:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp22853vcb; Mon, 26 May 2014 00:21:30 -0700 (PDT) X-Received: by 10.224.69.130 with SMTP id z2mr30489102qai.87.1401088889858; Mon, 26 May 2014 00:21:29 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j7si12422881qaa.114.2014.05.26.00.21.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 26 May 2014 00:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:54837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WopDt-0006Qa-DO for patch@linaro.org; Mon, 26 May 2014 03:21:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WopCm-000543-Ff for qemu-devel@nongnu.org; Mon, 26 May 2014 03:20:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WopCi-0007LY-0N for qemu-devel@nongnu.org; Mon, 26 May 2014 03:20:20 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WopCh-0007Kx-Ob; Mon, 26 May 2014 03:20:15 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 8ACC842FA3; Mon, 26 May 2014 11:20:13 +0400 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 66F76666; Mon, 26 May 2014 11:20:13 +0400 (MSK) Received: (nullmailer pid 22989 invoked by uid 1000); Mon, 26 May 2014 07:20:13 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 26 May 2014 11:19:50 +0400 Message-Id: <1401088811-22923-3-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1401088811-22923-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1401088811-22923-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [Qemu-devel] [PULL 02/23] iohandler.c: Properly initialize sigaction struct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mjt@tls.msk.ru X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell The code in qemu_init_child_watch() wasn't clearing the 'struct sigaction' before passing it to sigaction(); this meant that we would block a random set of signals while executing the SIGCHLD handler. Initialize properly by using memset() on the struct, as we do in similar cases elsewhere. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- iohandler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iohandler.c b/iohandler.c index ae2ef8f..cca614f 100644 --- a/iohandler.c +++ b/iohandler.c @@ -191,6 +191,7 @@ static void qemu_init_child_watch(void) struct sigaction act; sigchld_bh = qemu_bh_new(sigchld_bh_handler, NULL); + memset(&act, 0, sizeof(act)); act.sa_handler = sigchld_handler; act.sa_flags = SA_NOCLDSTOP; sigaction(SIGCHLD, &act, NULL);