|
|
1.1 root 1: .TH SETJMP 3
2: .CT 2 proc_man
3: .SH NAME
4: setjmp, longjmp \(mi 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: .fi
15: .SH DESCRIPTION
16: These routines are useful for dealing with errors
17: and interrupts encountered in
18: a low-level subroutine of a program.
19: .PP
20: .I Setjmp
21: saves its stack environment in
22: .I env
23: for later use by
24: .I longjmp.
25: It returns value 0.
26: .PP
27: .I Longjmp
28: restores the environment saved by the last call of
29: .IR setjmp .
30: It then causes execution to
31: continue as if the call of
32: .I setjmp
33: had just returned with value
34: .IR val .
35: The invoker of
36: .I setjmp
37: must not itself have returned in the interim.
38: All accessible data have values as of the time
39: .I longjmp
40: was called.
41: .SH "SEE ALSO"
42: .IR signal (2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.