Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread cancelation



Thanks for the tip. After adding that #define it works.

I've scoured the ADC site for anything at all about this. Where would this be documented? (Other than this email.) I don't see anything documented in the pthreads man pages nor in the header files about alternate behaviors. I'm used to working with DEC Unix where the man pages document the various alternate behaviors next to the #define switches that control them.

-Joe



On Oct 26, 2005, at 6:23 PM, Terry Lambert wrote:

Both POSIX and non-POSIX behaviours are available as of Tiger.  The default behaviour in Tiger is to maintain non-POSIX binary backward compatibility for programs which are merely recompiled, and would break if the behaviour suddenly changed to support strict POSIX interpretation of API definitions.


If you are running on a newer MacOS X (e.g. you are running Tiger/Cambridge Update), then before including the headers, simply do a:


    #define _POSIX_C_SOURCE 200112L


to ask for POSIX standard cancellation behaviour from the threads APIs.  This will also ask all the other API usages for variant APIs in that compilation unit to have more standard POSIX behaviour, and it will prevent the prototypes and manifest constants for non-POSIX APIs being visible, so you may need to break up your compilation units, if you need to use any non-POSIX APIs.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden

References: 
 >thread cancelation (From: Joseph Oreste Bruni <email@hidden>)
 >Re: thread cancelation (From: Terry Lambert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.