apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: Bug in threadproc/unix/thread.c
Date Fri, 10 May 2013 21:21:57 GMT
On Fri, May 10, 2013 at 5:10 PM, Dusan <dusanv@gmail.com> wrote:
> To check the detach status in function apr_threadattr_detach_get, there's
> this test:
>
> if (state == 1)
>
> Docs say 'state' will be set to PTHREAD_CREATE_DETACHED when attributes are
> for a detached thread. PTHREAD_CREATE_DETACHED is defined to 1 on Linux and
> 2 on OS X. So the test works fine on Linux but not on OS X. Why not just do
> this:
>
> if (state == PTHREAD_CREATE_DETACHED)
>

I think I saw this macro/enum at a high non-1 value in a Solaris header too.



--
Eric Covener
covener@gmail.com

Mime
View raw message