Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: longjmp out of signal handler Message-ID: <1990Nov30.172846.23669@zoo.toronto.edu> Organization: U of Toronto Zoology References: <17@christmas.UUCP> Date: Fri, 30 Nov 90 17:28:46 GMT In article <17@christmas.UUCP> rtm@christmas.UUCP (Richard Minner) writes: >Is it the `no nesting' clause that kills it? If not, then I believe >that ANSI guarantees at least minimal support for longjmp'ing out of >handlers... Although the wording under longjmp() and under signal() could stand to be a bit more consistent, there is an important distinction under signal() that I glossed over. In ANSI C, it is possible to explicitly cause a signal with the raise() function (or abort(), for that matter). Signal handlers invoked thusly are specifically exempt from the restrictions, so they can call longjmp() portably. Hence the demand that longjmp() be usable in signal handlers. However, the harsher rules still apply to, so to speak, accidental signals. -- "The average pointer, statistically, |Henry Spencer at U of Toronto Zoology points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu utzoo!henry