Re: seg.fault in pthread library
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com You wwant section 2.9.5. -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... <http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
THe only place you can depend on cancellation working portably is a limited set of functions where it's specifically required ("Cancellation points shall occur..."), rather than where it's allowed ("A cancellation may also occur...") but not guaranteed. You are guaranteed that they aren't upported anywhere else: An implementation shall not introduce cancellation points into any other functions specified in this volume of IEEE Std 1003.1-2001. On Mar 26, 2009, at 3:24 PM, Stefan Solbrig wrote: Hi, thanks for the help! So I have to be more careful with pthread_cancel(). But this brings me to another question: is there a list which functions are cancellation points? It is not legal POSIX to cancel a thread which has already been joined, since its local state information has potentially been destroyed and/or freed back to the system. It's morally equivalent to freeing memory and then dereferencing the pointer that used to point to it and hoping it still lives in your address space. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert