Re: #pragma cancel_handler
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Tue, 07 Nov 2006 15:12:04 -0500
Steve Richter wrote On 11/07/06 14:51,:
Lew Pitcher wrote:
Steve Richter wrote:
Is there an ANSI C or GNU C equivalent to the #pragma cancel_handler
provided in IBM's ILE C compiler?
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/cpprog436.htm
FWIW, according to the above link, a cancel_handler is a C++ feature.
Since this is comp.lang.C, we don't know about or discuss C++ features.
There certainly won't be an ANSI C equivalent to the #pragma
cancel_handler in ILE C, because that feature is not part of the C
language at all.
yeah, it does say that but I have used it in ILE C and it works as
documented. I dont follow. How does ANSI C handle exceptions?
The same way a fish rides a bicycle.
There are no exceptions in C, hence no handling.
I am
reading about signal handlers in the Linux books I have but none of
them seem to deal with how to implement a try .... finally block.
Not surprising: C has no "try ... finally block," and signals
are not exceptions.
As others have pointed out, you are addressing your question
to the wrong newsgroup. You are asking cooks about calculus, or
mathematicians about marzipan. You may get some answers, but if
I were you I wouldn't pay them much attention -- find a forum
where the people actually know something about your topic and
won't just make wild guesses.
That forum might be comp.lang.c++, as your repeated references
to try/finally suggest you may be writing in that language (maybe
without knowing it). Or if cancel_handler is not a C++ feature
but an IBM-specific extension, maybe you should look for a forum
devoted to IBM-specific topics. If this cancel_handler thing is
as useful and pervasive as you imply, you cannot be the first
person who's tried to find a substitute for it.
But whatever it may be, it's not C.
--
Eric.Sosman@xxxxxxx
.
- References:
- #pragma cancel_handler
- From: Steve Richter
- Re: #pragma cancel_handler
- From: Lew Pitcher
- Re: #pragma cancel_handler
- From: Steve Richter
- #pragma cancel_handler
- Prev by Date: Re: swap of two no.?????
- Next by Date: Re: #pragma cancel_handler
- Previous by thread: Re: #pragma cancel_handler
- Next by thread: Re: #pragma cancel_handler
- Index(es):
Relevant Pages
|
|