Re: Man page bug report about pthread_join

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

 



On 08/29/2016 01:59 PM, Michael Kerrisk (man-pages) wrote:
> Hello Mats,

>> The wording here comes off kind of awkward. How about this as an
>> alternate thought:
>>
>> If retval is not NULL, pthread_join shall return a pointer to a location
>> containing the exit status of the target thread in retval. If the target
>> thread was canceled, the exit status will indicate PTHREAD_CANCELED.
> 
> I guess it's in the eye of the beholder. 

of course.


>> While we're here, this page doesn't mention the justification for
>> joining in the first place, which is to have an opportunity to clean up
>> after a thread exits - or rather, it is mentioned, but in a negative
>> sense ("failure to join with a thread that is joinable..."). I don't
>> immediately have a proposal, but could think about it if anyone believes
>> that's a good idea.
> 
> I added a sentence at the end of the first paragraph in NOTES:
> 
>        After a successful call to pthread_join(), the caller  is  guaran‐
>        teed  that  the target thread has terminated.  <<The caller may then
>        choose to do any clean-up that is required  after  termination  of
>        the  thread  (e.g.,  freeing  memory  or other resources that were
>        allocated to the target thread).>>
> 
> Helpful?

Yes, I think that improves things.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux