Re: seg.fault in pthread library
Re: seg.fault in pthread library
- Subject: Re: seg.fault in pthread library
- From: Terry Lambert <email@hidden>
- Date: Fri, 27 Mar 2009 02:55:42 -0700
<http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
>
You wwant section 2.9.5.
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.
-- Terry
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.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden