threads/72953: fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYSTEM

David Xu davidxu at freebsd.org
Fri Oct 22 08:48:22 PDT 2004


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 at isc.org>
>To: freebsd-gnats-submit at FreeBSD.org, marka at 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 at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-threads
>To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"
>
>
>  
>



More information about the freebsd-threads mailing list