setjmp, longjmp − non-local goto
These routines are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. saves its stack environment in for later use by It returns value 0. restores the environment saved by the last call of It then returns in such a way that execution continues as if the call of had just returned the value to the function that invoked which must not itself have returned in the interim. If longjmp is called from a fault handler, see nofault(3spp), the flow of control may be altered in a manner not visible to the compiler system. In this case, all global and static variables which may be updated between the setjmp and the longjmp, where these updates must be visible after longjmp, should be declared "volatile". If longjmp is not invoked from a fault handler, this restriction is not necessary. nofault(3spp)