1_LONGJMP(3P)               POSIX Programmer's Manual              _LONGJMP(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       _longjmp, _setjmp — non-local goto
14

SYNOPSIS

16       #include <setjmp.h>
17
18       void _longjmp(jmp_buf env, int val);
19       int _setjmp(jmp_buf env);
20

DESCRIPTION

22       The _longjmp() and _setjmp() functions shall be equivalent to longjmp()
23       and  setjmp(),  respectively,  with  the  additional  restriction  that
24       _longjmp() and _setjmp() shall not manipulate the signal mask.
25
26       If _longjmp() is called even though env was never initialized by a call
27       to  _setjmp(),  or  when  the last such call was in a function that has
28       since returned, the results are undefined.
29

RETURN VALUE

31       Refer to longjmp() and setjmp().
32

ERRORS

34       No errors are defined.
35
36       The following sections are informative.
37

EXAMPLES

39       None.
40

APPLICATION USAGE

42       If _longjmp() is executed and the environment in  which  _setjmp()  was
43       executed no longer exists, errors can occur. The conditions under which
44       the environment of the _setjmp() no longer exists include  exiting  the
45       function  that  contains the _setjmp() call, and exiting an inner block
46       with temporary storage. This condition  might  not  be  detectable,  in
47       which  case  the  _longjmp()  occurs  and, if the environment no longer
48       exists, the contents of the temporary storage of  an  inner  block  are
49       unpredictable.  This condition might also cause unexpected process ter‐
50       mination. If the function has returned, the results are undefined.
51
52       Passing longjmp() a pointer to a buffer not created by setjmp(),  pass‐
53       ing  _longjmp() a pointer to a buffer not created by _setjmp(), passing
54       siglongjmp() a pointer to a buffer not created by sigsetjmp(), or pass‐
55       ing any of these three functions a buffer that has been modified by the
56       user can cause all the problems listed above, and more.
57
58       The _longjmp() and _setjmp() functions are included to support programs
59       written  to  historical  system interfaces. New applications should use
60       siglongjmp() and sigsetjmp() respectively.
61

RATIONALE

63       None.
64

FUTURE DIRECTIONS

66       The _longjmp() and _setjmp() functions may be removed in a future  ver‐
67       sion.
68

SEE ALSO

70       longjmp(), setjmp(), siglongjmp(), sigsetjmp()
71
72       The Base Definitions volume of POSIX.1‐2008, <setjmp.h>
73
75       Portions  of  this text are reprinted and reproduced in electronic form
76       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
77       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
78       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
79       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
80       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
81       event of any discrepancy between this version and the original IEEE and
82       The Open Group Standard, the original IEEE and The Open Group  Standard
83       is  the  referee document. The original Standard can be obtained online
84       at http://www.unix.org/online.html .
85
86       Any typographical or formatting errors that appear  in  this  page  are
87       most likely to have been introduced during the conversion of the source
88       files to man page format. To report such errors,  see  https://www.ker
89       nel.org/doc/man-pages/reporting_bugs.html .
90
91
92
93IEEE/The Open Group                  2013                         _LONGJMP(3P)
Impressum