View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001167 | 1003.1(2016/18)/Issue7+TC2 | System Interfaces | public | 2017-10-30 16:33 | 2024-06-11 09:09 |
| Reporter | Florian Weimer | Assigned To | |||
| Priority | normal | Severity | Editorial | Type | Clarification Requested |
| Status | Closed | Resolution | Accepted As Marked | ||
| Name | Florian Weimer | ||||
| Organization | Red Hat | ||||
| User Reference | https://sourceware.org/bugzilla/show_bug.cgi?id=22337 | ||||
| Section | pthread_detach | ||||
| Page Number | unknown | ||||
| Line Number | unknown | ||||
| Interp Status | --- | ||||
| Final Accepted Text | 0001167:0004238 | ||||
| Summary | 0001167: Does pthread_detach make a thread non-joinable? | ||||
| Description | The description of pthread_detach is carefully worded in such a way that it does not mention whether the thread ceases to be joinable/is in a detached state after the call to the function. It is unclear what the intent is. Based on a strict reading of specification, the only way to create a non-joinable thread is the detachstate thread attribute specified at thread creation. There are two choices here: Mention that pthread_detach makes the thread non-joinable, or explicitly say that pthread_detach does not alter the joinable state of the thread (so that pthread_join is permitted if the lifetime of the thread has not ended yet). | ||||
| Desired Action | The GNU C Library favors that pthread_detach makes the thread non-joinable because this is what the current implementation does. | ||||
| Tags | tc3-2008 | ||||
|
|
Hmm, XSH 2.9.2 "Thread IDs" ends with this sentence: If a thread is detached, its thread ID is invalid for use as an argument in a call to pthread_detach()or pthread_join(). Does that cover this? |
|
|
It is unclear if XSH 2.9.2 “detached” here refers to the detachstate, or the action of pthread_detach. The behavior of pthread_detach is specified as: “The pthread_detach() function shall indicate to the implementation that storage for the thread thread can be reclaimed when that thread terminates.” So it is specifically not phrased in terms of detached/joinable threads. |
|
|
On page 1636 line 53334 section pthread_detach(), change:The pthread_detach() function shall indicate to the implementation that storage for the thread thread can be reclaimed when that thread terminates.to: The pthread_detach() function shall change the thread thread from joinable to detached, indicating to the implementation that storage for the thread can be reclaimed when the thread terminates. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-10-30 16:33 | Florian Weimer | New Issue | |
| 2017-10-30 16:33 | Florian Weimer | Name | => Florian Weimer |
| 2017-10-30 16:33 | Florian Weimer | Organization | => Red Hat |
| 2017-10-30 16:33 | Florian Weimer | User Reference | => https://sourceware.org/bugzilla/show_bug.cgi?id=22337 |
| 2017-10-30 16:33 | Florian Weimer | Section | => pthread_detach |
| 2017-10-30 16:33 | Florian Weimer | Page Number | => unknown |
| 2017-10-30 16:33 | Florian Weimer | Line Number | => unknown |
| 2017-10-30 16:40 | philip-guenther | Note Added: 0003875 | |
| 2017-10-30 16:47 | Florian Weimer | Note Added: 0003876 | |
| 2019-01-31 17:28 | geoffclare | Note Added: 0004238 | |
| 2019-01-31 17:29 | geoffclare | Interp Status | => --- |
| 2019-01-31 17:29 | geoffclare | Final Accepted Text | => 0001167:0004238 |
| 2019-01-31 17:29 | geoffclare | Status | New => Resolved |
| 2019-01-31 17:29 | geoffclare | Resolution | Open => Accepted As Marked |
| 2019-01-31 17:29 | geoffclare | Tag Attached: tc3-2008 | |
| 2019-11-08 10:28 | geoffclare | Status | Resolved => Applied |
| 2024-06-11 09:09 | agadmin | Status | Applied => Closed |