Unix error handling

David M. Alexander david at Neon.Stanford.EDU
Tue Sep 4 10:43:07 AEST 1990


In article <1990Sep2.050854.12008 at nixtdc.uucp> doug at nixtdc.UUCP (Doug Moen) writes:
>Here's the obligatory new idea:
>I don't like the fact that Unix kills a process if it blows the stack
>due to an infinite recursive loop.  The problem could be fixed with
>the introduction of an exception handling mechanism that the kernel
>knows about.  If the stack overflows, then the kernel raises an exception
>within the offending process.  The exception unwinds the stack (thereby
>recovering stack space) until a stack frame containing an exception
>handler is found.  If no exception handler is active, then (and only then)
>is the process killed.
>-- 
>Doug Moen
>{mnetor,alias,geac,torsqnt,lsuc}!nixtdc!doug
>77 Carlton #1504, Toronto, Ontario, Canada M5B 2J7


You must have been reading about AIXv3 setjmp() and longjmp() recently.
You can use these calls to do exactly that.
AIXv3 is turning out to be a really nice OS.

Dave Alexander



More information about the Comp.unix.internals mailing list