Trying to join an already exited pthread

youshi10 at u.washington.edu youshi10 at u.washington.edu
Wed Feb 7 22:37:06 UTC 2007


On Wed, 7 Feb 2007, Pietro Cerutti wrote:

> On 2/7/07, youshi10 at u.washington.edu <youshi10 at u.washington.edu> wrote:
>> Just wondering:
>> 
>> If I was to try and join a pthread that already exited, would there be an 
>> error message output and/or errno set to an error value, or would a system 
>> hang?
>
> man pthread_join(3):
>
> ERRORS
>    The pthread_join() function will fail if:
>    [EINVAL]           The implementation has detected that the value speci-
>                       fied by thread does not refer to a joinable thread.
>
> A pthread that already exited is considered non-joinable
>
>> It this variable on Unix OSes?
>
>
> The pthread_join() function conforms to ISO/IEC 9945-1:1996
>    (``POSIX.1'').

Excellent. Thank you very much for the info!

-Garrett



More information about the freebsd-hackers mailing list