bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGSEGV on recursive pthread_join


From: Jeroen Dekkers
Subject: Re: SIGSEGV on recursive pthread_join
Date: Thu, 8 Jan 2004 14:53:42 +0100
User-agent: Mutt/1.5.4i

On Thu, Jan 08, 2004 at 02:30:45PM +0100, Richard Guenther wrote:
> Oh, my "current" manpage for pthread_join says:
> 
>  "At most one thread can wait for the termination  of  a  given  thread.
>   Calling pthread_join on a thread th on which another thread is already
>   waiting for termination returns an error."
> 
> which does not say anything about undefined behavior, so, if glibc is the
> source for this manpage, one should make sure the current version is
> up-to-date with the current behavior.

Glibc isn't the source of any manpage, the glibc documentation are
the info pages (also available in other formats like html and ps if
you prefer that). I never use manpages because they are often
outdated or just otherwise incorrect.

> Also, SUS says
> 
>  "The results of multiple simultaneous calls to pthread_join() specifying
>   the same target thread are undefined."
>  [http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_join.html]
> 
> which talks about simultaneous pthread_join(), not about a join to a
> previously joined thread to which the errors EINVAL or ESRCH would be
> appropriate.

If you join a thread it waits until the thread is finished, so a
second call for the same thread is always simultaneous.

Jeroen Dekkers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]