|
|
1.1 ! root 1: .TH SETJMP 3 "19 January 1983" ! 2: .UC 4 ! 3: .SH NAME ! 4: setjmp, longjmp \- non-local goto ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .B #include <setjmp.h> ! 8: .PP ! 9: .B setjmp(env) ! 10: .B jmp_buf env; ! 11: .PP ! 12: .B longjmp(env, val) ! 13: .B jmp_buf env; ! 14: .PP ! 15: .B _setjmp(env) ! 16: .B jmp_buf env; ! 17: .PP ! 18: .B _longjmp(env, val) ! 19: .B jmp_buf env; ! 20: .fi ! 21: .SH DESCRIPTION ! 22: These routines are useful for dealing with errors ! 23: and interrupts encountered in ! 24: a low-level subroutine of a program. ! 25: .PP ! 26: .I Setjmp ! 27: saves its stack environment in ! 28: .I env ! 29: for later use by ! 30: .I longjmp. ! 31: It returns value 0. ! 32: .PP ! 33: .I Longjmp ! 34: restores the environment saved by the last call of ! 35: .IR setjmp . ! 36: It then returns in such a way that execution ! 37: continues as if the call of ! 38: .I setjmp ! 39: had just returned the value ! 40: .I val ! 41: to the function that invoked ! 42: .I setjmp, ! 43: which must not itself have returned in the interim. ! 44: All accessible data have values as of the time ! 45: .I longjmp ! 46: was called. ! 47: .PP ! 48: .I Setjmp ! 49: and ! 50: .I longjmp ! 51: save and restore the signal mask ! 52: .IR sigmask (2), ! 53: while ! 54: .I _setjmp ! 55: and ! 56: .I _longjmp ! 57: manipulate only the C stack and registers. ! 58: .SH "SEE ALSO" ! 59: sigvec(2), sigstack(2), signal(3) ! 60: .SH BUGS ! 61: .I Setjmp ! 62: does not save current notion of whether the process is ! 63: executing on the signal stack. The result is that a ! 64: longjmp to some place on the signal stack leaves the ! 65: signal stack state incorrect.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.