From owner-freebsd-threads@FreeBSD.ORG Fri Oct 22 15:48:22 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1AC816A4CE for ; Fri, 22 Oct 2004 15:48:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8707843D1D; Fri, 22 Oct 2004 15:48:22 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) i9MFmKsS054703; Fri, 22 Oct 2004 15:48:21 GMT (envelope-from davidxu@freebsd.org) Message-ID: <41792BC6.3020408@freebsd.org> Date: Fri, 22 Oct 2004 23:48:22 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040921 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Andrews References: <200410220230.i9M2UVxo039281@freefall.freebsd.org> In-Reply-To: <200410220230.i9M2UVxo039281@freefall.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: threads/72953: fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYSTEM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2004 15:48:22 -0000 Interesting, how can you treat the program as single threaded while calling pthread_xxx which is obviously defined for multithread? process only has one thread does not mean it is single-threaded, when you are linking pthread library, the program should be treated as multi-threaded, otherwise don't link with it. Mark Andrews wrote: >The following reply was made to PR threads/72953; it has been noted by GNATS. > >From: Mark Andrews >To: freebsd-gnats-submit@FreeBSD.org, marka@isc.org >Cc: >Subject: Re: threads/72953: fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYSTEM >Date: Fri, 22 Oct 2004 12:29:34 +1000 > > No. The restriction are for multi-threaded processes not single > threaded processes. The test case is still single threaded when fork() > is called. > > Also pthread_sigmask() / sigprocmask() are supposed to be identical in > single threaded applications. Replacing pthread_sigmask() with > sigprocmask() changes the resulting behaviour. > > http://www.opengroup.org/onlinepubs/007908799/xsh/sigprocmask.html > http://www.opengroup.org/onlinepubs/007908799/xsh/fork.html >_______________________________________________ >freebsd-threads@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-threads >To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > > > >