You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2004/04/19 19:12:59 UTC

DO NOT REPLY [Bug 28472] New: - On Mac OS X, apr_threadattr_detach_set() should use PTHREAD_CREATE_DETACHED/JOINABLE

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28472>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28472

On Mac OS X, apr_threadattr_detach_set() should use PTHREAD_CREATE_DETACHED/JOINABLE

           Summary: On Mac OS X, apr_threadattr_detach_set() should use
                    PTHREAD_CREATE_DETACHED/JOINABLE
           Product: APR
           Version: HEAD
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: APR
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: inoue@ariel-networks.com


I know only Mac OS X 10.2, but v10.3x would be same.

unix/apr_threadattr_detach_set() assumes that both PTHREAD_CREATE_DETACHED and
PTHREAD_CREATE_JOINABLE values, that is, the former value is 1 and the latter
value is 0. But, on Mac OS X, the assumption is wrong.

So, we need the code like this,

  if (on) {
      on = PTHREAD_CREATE_DETACHED;
  } else {
      on = PTHREAD_CREATE_JOINABLE;
  }
  if ((stat = pthread_attr_setdetachstate(attr->attr, on)) == 0) {

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org