1<assertions> 2 <assertion id="1" tag="ref:XSH6:32943:32944"> 3 The function 4 5 int pthread_detach(pthread_t thread); 6 7 detaches a thread. It shall indicate to the implementation that storage 8 for 'thread' can be reclaimed when that thread terminates. 9 </assertion> 10 <assertion id="2" tag="ref:XSH6:32944:32946"> 11 If 'thread' has not terminated, pthread_detach() won't cause it to 12 terminate. The effect of multiple pthread_detach() calls on the same 13 target thread is unspecified. 14 </assertion> 15 <assertion id="3" tag="ref:XSH6:32948:32948"> 16 If success, it returns 0; 17 </assertion> 18 <assertion id="4" tag="ref:XSH6:32951:32956"> 19 Upon failure, it returns an error number: 20 -[EINVAL] 'thread' does not refer to a joinable thread. 21 -[ESRCH] No thread could be found corresponding to that thread ID 22 23 It shall not return [EINTR] 24 </assertion> 25</assertions> 26