[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: Bug in threadproc/unix/thread.c
From:       Rainer Jung <rainer.jung () kippdata ! de>
Date:       2013-05-11 7:52:27
Message-ID: 518DF8BB.6030208 () kippdata ! de
[Download RAW message or body]

On 10.05.2013 23:21, Eric Covener wrote:
> 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.

Yes, from pthread.h:

#define PTHREAD_CREATE_DETACHED     0x40

I applied the proposed change in r1481262-r1481264 to trunk, 1.5.x and
1.4.x and then changed it to use a pre-existing macro instead in
r1481265-r1481267.

Regards,

Rainer
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic