Unix error handling
Deryk Barker
DBarker at system-m.phx.bull.com
Wed Sep 5 05:50:36 AEST 1990
In V10#37 Doug Moen <doug at nixtdc.uucp> 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.
Ah, what you want is the Multics operating system. The system which
inspired Unix in the first place and which most Unix people never
mention. The facility you desire exists in Multics, with a further
feature: the process is not killed if no handler is found, but is
suspended and another level of the command processor is pushed onto the
stack. If you can somehow fix the problem which caused the stack
overflow (or any other exception) then you can restart the suspended
procedure at the faulting instruction. This even works for missing
routines when you are using the dyamic linking facility (and you thought
OS/2 invented dynamic links!). You can create the missing routine and
restart the calling program; makes for a most impressive demo.
Unfortunately, Honeywell, who inherited Multics from GE in 1971, capped
the product in 1984 and it is no longer sold. There are still some
systems in existence (I'm writing this on one now) and I shall miss it
very much when it finally goes away. The finest OS every written - bar
none.
And "David M. Alexander" <david at neon.stanford.edu> replies:
> 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.
Nice that IBM is finally catching up - some 25 years after the original
Multics design work....
Deryk Barker,
Jupiter Software,
Victoria BC.
"Send Lawyers, Guns and Money,
Dad, get me out of this!"
More information about the Comp.unix.internals
mailing list