Xref: utzoo comp.lang.misc:5450 comp.unix.internals:43 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!decwrl!shelby!neon!david From: david@Neon.Stanford.EDU (David M. Alexander) Newsgroups: comp.lang.misc,comp.unix.internals Subject: Re: Unix error handling Message-ID: <1990Sep4.004307.12274@Neon.Stanford.EDU> Date: 4 Sep 90 00:43:07 GMT References: <1990Aug31.190751.12522@dg-rtp.dg.com> <556:Aug3122:09:3290@kramden.acf.nyu.edu> <1990Sep2.050854.12008@nixtdc.uucp> Distribution: usa Organization: Computer Science Department, Stanford University Lines: 21 In article <1990Sep2.050854.12008@nixtdc.uucp> doug@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