Re: Newbie exception handler question
briggs_at_encompasserve.org
Date: 12/15/04
- Next message: FredK: "Re: [Nomex on]: Security research suggests Linux has fewer flaws"
- Previous message: prep_at_prep.synonet.com: "Re: [Nomex on]: Security research suggests Linux has fewer flaws"
- In reply to: Z: "Re: Newbie exception handler question"
- Next in thread: Thierry Dussuet: "Re: Newbie exception handler question"
- Reply: Thierry Dussuet: "Re: Newbie exception handler question"
- Reply: Larry Kilgallen: "Re: Newbie exception handler question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Dec 2004 12:35:41 -0600
In article <6g_vd.2109$vJ2.1826@fe07.lga>, Z <z@no.spam> writes:
> JF Mezei wrote:
>> OK, I want a C program to call one of my routines to cleanup stuff under
>> absolutely ALL circumstances, whether it be a <CTRL-C>, <CTRL-Y>, $FORCEX ,
>> divide by 0 or other exception, STOP/ID, power failure, atomic bomb, or
>> unexpected and abrupt end of universe.
>
> AFAIK, you can't see/trap STOP/ID, nor various other possible events,
> like HALTs, BUGCHECKs and system crashes.
Yes, you can trap STOP/ID. You want to install a rundown handler
with a user written system service. Check out SYS$EXAMPLES:UWSS.C
Control-C or control-Y do not, in and of themselves, terminate your
image. So there's no reason to trap them. If the control-Y event
succeeds in returning control to the CLI and the CLI triggers image
exit, the rundown handler will take care of it, even if the command
used at the CLI is "$ STOP". An ordinary exit handler will not be
triggered in the "STOP" case, but will otherwise be adequate to
deal with control-C or control-Y.
$FORCEX is simply a call to $EXIT delivered as an AST. So ordinary
exit handlers can deal with that. As can rundown handlers.
Divide by 0 or other exceptions do not, in and of themselves, cause
image termination. If handled, the handler may cause image exit.
And if unhandled, the default handler ("unhandled condition, image
exit forced") will cause image exit. Either way, either a rundown
handler or an ordinary exit handler will be triggered.
Rundown handlers are unlikely to trap power failure. They are
certainly inadequate to deal with close proximity nuclear detonations
or with the end of the universe.
John Briggs
- Next message: FredK: "Re: [Nomex on]: Security research suggests Linux has fewer flaws"
- Previous message: prep_at_prep.synonet.com: "Re: [Nomex on]: Security research suggests Linux has fewer flaws"
- In reply to: Z: "Re: Newbie exception handler question"
- Next in thread: Thierry Dussuet: "Re: Newbie exception handler question"
- Reply: Thierry Dussuet: "Re: Newbie exception handler question"
- Reply: Larry Kilgallen: "Re: Newbie exception handler question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|