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

NAME

12       _longjmp, _setjmp - non-local goto
13

SYNOPSIS

15       #include <setjmp.h>
16
17       void _longjmp(jmp_buf env, int val);
18       int _setjmp(jmp_buf env);
19
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
44       which the environment of the _setjmp() no longer exists include exiting
45       the  function  that  contains  the _setjmp() call, and exiting an inner
46       block with temporary storage.  This condition might not be  detectable,
47       in  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 marked LEGACY in a future
67       version.
68

SEE ALSO

70       longjmp(),  setjmp(),  siglongjmp(),  sigsetjmp(), the Base Definitions
71       volume of IEEE Std 1003.1-2001, <setjmp.h>
72
74       Portions of this text are reprinted and reproduced in  electronic  form
75       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
76       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
77       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
78       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
79       event of any discrepancy between this version and the original IEEE and
80       The Open Group Standard, the original IEEE and The Open Group  Standard
81       is  the  referee document. The original Standard can be obtained online
82       at http://www.opengroup.org/unix/online.html .
83
84
85
86IEEE/The Open Group                  2003                         _LONGJMP(3P)
Impressum