1_LONGJMP(P) POSIX Programmer's Manual _LONGJMP(P)
2
3
4
6 _longjmp, _setjmp - non-local goto
7
9 #include <setjmp.h>
10
11 void _longjmp(jmp_buf env, int val);
12 int _setjmp(jmp_buf env);
13
14
16 The _longjmp() and _setjmp() functions shall be equivalent to longjmp()
17 and setjmp(), respectively, with the additional restriction that
18 _longjmp() and _setjmp() shall not manipulate the signal mask.
19
20 If _longjmp() is called even though env was never initialized by a call
21 to _setjmp(), or when the last such call was in a function that has
22 since returned, the results are undefined.
23
25 Refer to longjmp() and setjmp() .
26
28 No errors are defined.
29
30 The following sections are informative.
31
33 None.
34
36 If _longjmp() is executed and the environment in which _setjmp() was
37 executed no longer exists, errors can occur. The conditions under
38 which the environment of the _setjmp() no longer exists include exiting
39 the function that contains the _setjmp() call, and exiting an inner
40 block with temporary storage. This condition might not be detectable,
41 in which case the _longjmp() occurs and, if the environment no longer
42 exists, the contents of the temporary storage of an inner block are
43 unpredictable. This condition might also cause unexpected process ter‐
44 mination. If the function has returned, the results are undefined.
45
46 Passing longjmp() a pointer to a buffer not created by setjmp(), pass‐
47 ing _longjmp() a pointer to a buffer not created by _setjmp(), passing
48 siglongjmp() a pointer to a buffer not created by sigsetjmp(), or pass‐
49 ing any of these three functions a buffer that has been modified by the
50 user can cause all the problems listed above, and more.
51
52 The _longjmp() and _setjmp() functions are included to support programs
53 written to historical system interfaces. New applications should use
54 siglongjmp() and sigsetjmp() respectively.
55
57 None.
58
60 The _longjmp() and _setjmp() functions may be marked LEGACY in a future
61 version.
62
64 longjmp() , setjmp() , siglongjmp() , sigsetjmp() , the Base Defini‐
65 tions volume of IEEE Std 1003.1-2001, <setjmp.h>
66
68 Portions of this text are reprinted and reproduced in electronic form
69 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
70 -- Portable Operating System Interface (POSIX), The Open Group Base
71 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
72 Electrical and Electronics Engineers, Inc and The Open Group. In the
73 event of any discrepancy between this version and the original IEEE and
74 The Open Group Standard, the original IEEE and The Open Group Standard
75 is the referee document. The original Standard can be obtained online
76 at http://www.opengroup.org/unix/online.html .
77
78
79
80IEEE/The Open Group 2003 _LONGJMP(P)