From owner-svn-src-head@FreeBSD.ORG Tue Aug 31 02:23:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B34F10656A8; Tue, 31 Aug 2010 02:23:06 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0A64E8FC1E; Tue, 31 Aug 2010 02:23:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7V2N4UF019437; Tue, 31 Aug 2010 02:23:05 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C7CD808.3060903@freebsd.org> Date: Tue, 31 Aug 2010 10:23:04 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201008300006.o7U065Nu078151@svn.freebsd.org> In-Reply-To: <201008300006.o7U065Nu078151@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211982 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 02:23:06 -0000 Pawel Jakub Dawidek wrote: > Author: pjd > Date: Mon Aug 30 00:06:05 2010 > New Revision: 211982 > URL: http://svn.freebsd.org/changeset/base/211982 > > Log: > Use sigtimedwait(2) for signals handling in primary process. > This fixes various races and eliminates use of pthread* API in signal handler. > > Pointed out by: kib > With help from: jilles > MFC after: 2 weeks > Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com > > Modified: > head/sbin/hastd/primary.c > Note that if you are sigwaiting signals, these signals should be masked, otherwise, there is a race condition. I have not read the code, maybe this is not a problem. Regards, David Xu