Main index | Section 3 | 日本語 | Deutsch | Options |
#include <setjmp.h>
The corresponding longjmp() functions restore the environment saved by their most recent respective invocations of the setjmp() function. They then return so that program execution continues as if the corresponding invocation of the setjmp() call had just returned the value specified by val, instead of 0.
Pairs of calls may be intermixed, i.e., both sigsetjmp() and siglongjmp() and setjmp() and longjmp() combinations may be used in the same program, however, individual calls may not, e.g.amp; the env argument to setjmp() may not be passed to siglongjmp().
The longjmp() routines may not be called after the routine which called the setjmp() routines returns.
All accessible objects have values as of the time longjmp() routine was called, except that the values of objects of automatic storage invocation duration that do not have the volatile type and have been changed between the setjmp() invocation and longjmp() call are indeterminate.
The setjmp()/longjmp() pairs save and restore the signal mask while _setjmp()/_longjmp() pairs save and restore only the register set and the stack. (See sigprocmask(2, .))
The sigsetjmp()/siglongjmp() function pairs save and restore the signal mask if the argument savemask is non-zero, otherwise only the register set and the stack are saved.
SETJMP (3) | June 4, 1993 |
Main index | Section 3 | 日本語 | Deutsch | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Like a classics radio station whose play list spans decades, Unix simultaneously exhibits its mixed and dated heritage. There's Clash-era graphics interfaces; Beatles-era two-letter command names; and systems programs (for example, ps) whose terse and obscure output was designed for slow teletypes; Bing Crosby-era command editing (# and @ are still the default line editing commands), and Scott Joplin-era core dumps. | ” |
— The Unix Haters' handbook |