Date: Fri, 22 Oct 2004 23:48:22 +0800 From: David Xu <davidxu@freebsd.org> To: Mark Andrews <Mark_Andrews@isc.org> Cc: freebsd-threads@freebsd.org Subject: Re: threads/72953: fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYSTEM Message-ID: <41792BC6.3020408@freebsd.org> In-Reply-To: <200410220230.i9M2UVxo039281@freefall.freebsd.org> References: <200410220230.i9M2UVxo039281@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <Mark_Andrews@isc.org> >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" > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41792BC6.3020408>