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 From: Michael Tokarev Date: Mon, 26 May 2014 11:19:50 +0400 Message-Id: <1401088811-22923-3-git-send-email-mjt@msgid.tls.msk.ru> 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> Subject: [Qemu-devel] [PULL 02/23] iohandler.c: Properly initialize sigaction struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev 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); -- 1.7.10.4