1 .\" Written by Michael Haardt, Fri Nov 25 14:51:42 MET 1994
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
24 .\" Added siglongjmp, Sun Mar 2 22:03:05 EST 1997, jrv@vanzandt.mv.com
25 .\" Modifications, Sun Feb 26 14:39:45 1995, faith@cs.unc.edu
27 .TH LONGJMP 3 2009-01-13 "" "Linux Programmer's Manual"
29 longjmp, siglongjmp \- nonlocal jump to a saved stack context
32 .B #include <setjmp.h>
34 .BI "void longjmp(jmp_buf " env ", int " val );
36 .BI "void siglongjmp(sigjmp_buf " env ", int " val );
40 Feature Test Macro Requirements for glibc (see
41 .BR feature_test_macros (7)):
45 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_C_SOURCE
50 are useful for dealing with errors
51 and interrupts encountered in a low-level subroutine of a program.
53 restores the environment saved by the last call of
55 with the corresponding
60 is completed, program execution continues as if the
63 had just returned the value
66 cannot cause 0 to be returned.
69 is invoked with a second argument of 0, 1 will be returned instead.
74 except for the type of
86 also restores the signal mask that was saved by
89 These functions never return.
91 C89, C99, and POSIX.1-2001 specify
93 POSIX.1-2001 specifies
96 POSIX does not specify whether
98 will restore the signal context (see
100 for some more details).
101 If you want to portably save and restore signal masks, use
106 The values of automatic variables are unspecified after a call to
108 if they meet all the following criteria:
110 they are local to the function that made the corresponding
114 their values are changed between the calls to
120 they are not declared as
123 Analogous remarks apply for
129 make programs hard to
130 understand and maintain.
131 If possible, an alternative should be used.
136 This page is part of release 3.67 of the Linux
139 A description of the project,
140 information about reporting bugs,
141 and the latest version of this page,
143 \%http://www.kernel.org/doc/man\-pages/.