From: Mark B. <bm...@us...> - 2003-04-18 20:29:07
|
Hello- The current POSIX standard (IEEE POSIX 1003.1-2001) (which is also the Open Group Single UNIX Specification v3, quoted below) currently states the following. This is the text as it appears after taking into account Technical Corrigendum 1: The pthread_detach( ) function shall fail if: [EINVAL] The implementation has detected that the value specified by thread does not refer to a joinable thread. [ESRCH] No thread could be found corresponding to that specified by the given thread ID. The pthread_detach( ) function shall not return an error code of [EINTR]. "shall fail" means "must detect the error condition in question and return the error result". This is going to be changed in the not-yet-released Technical Corrigendum 2 to read "may fail". "may fail" means that an application should not depend on the error being detected or returned as an error. Some implementors already know about the TC2, and may have taken action on it. ------------------- Mark S. Brown STSM, UNIX/Linux OS Standards IBM Systems Group bm...@us... Robert Williamson 18/04/03 02:52 PM To: Mark Brown/Austin/IBM@IBMUS, sri...@in... cc: Salina Chu/Austin/IBM@IBMUS, pos...@li..., ltp...@li... From: Robert Williamson/Austin/IBM@IBMUS Subject: Fw: [LTP] Question about pthread_detach testcase 4-2 Hey guys, I have a question about bugzilla #2519. I checked the link mentioned below and it seems that POSIX says that it "shall fail". Is "shall" closer to "must" or "may"? - Robbie Robert V. Williamson <ro...@us...> Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 678-9295 Fax: (512) 838-4603 Web: http://ltp.sourceforge.net IRC: #ltp on freenode.irc.net ==================== "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -Albert Einstein ----- Forwarded by Robert Williamson/Austin/IBM on 04/18/2003 02:43 PM ----- Dan Kegel <dk...@ix...> 04/18/2003 02:39 PM To: Robert Williamson/Austin/IBM@IBMUS, "'pos...@li... '" <pos...@li...> cc: "'ltp...@li... '" <ltp...@li...> Subject: RE: [LTP] Question about pthread_detach testcase 4-2 Robert Williamson wrote: > One of our developers here says that: > > ...pthread_detach "may fail" and not "must fail". In case the > implementation > is able to detect it might return ESRCH, if not it is OK to return > 0(success). > > Basically, in his opinion the testcase should check for "ret" equal to > ESRCH or 0, instead of the current implemenation of checking for ESRCH > only. I wanted to get some more thoughts on this before I change the > LTP's version. I don't see much support for that in http://www.opengroup.org/onlinepubs/007904975/functions/pthread_detach.html Can your developer point to the line of the standard he's referring to? - Dan |