logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

_longjmp.3p (3629B)


  1. '\" et
  2. .TH _LONGJMP "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. _longjmp,
  12. _setjmp
  13. \(em non-local goto
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <setjmp.h>
  18. .P
  19. void _longjmp(jmp_buf \fIenv\fP, int \fIval\fP);
  20. int _setjmp(jmp_buf \fIenv\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. The
  24. \fI_longjmp\fR()
  25. and
  26. \fI_setjmp\fR()
  27. functions shall be equivalent to
  28. \fIlongjmp\fR()
  29. and
  30. \fIsetjmp\fR(),
  31. respectively, with the additional restriction that
  32. \fI_longjmp\fR()
  33. and
  34. \fI_setjmp\fR()
  35. shall not manipulate the signal mask.
  36. .P
  37. If
  38. \fI_longjmp\fR()
  39. is called even though
  40. .IR env
  41. was never initialized by a call to
  42. \fI_setjmp\fR(),
  43. or when the last such call was in a function that has since returned,
  44. the results are undefined.
  45. .SH "RETURN VALUE"
  46. Refer to
  47. .IR "\fIlongjmp\fR\^(\|)"
  48. and
  49. .IR "\fIsetjmp\fR\^(\|)".
  50. .SH ERRORS
  51. No errors are defined.
  52. .LP
  53. .IR "The following sections are informative."
  54. .SH EXAMPLES
  55. None.
  56. .SH "APPLICATION USAGE"
  57. If
  58. \fI_longjmp\fR()
  59. is executed and the environment in which
  60. \fI_setjmp\fR()
  61. was executed no longer exists, errors can occur. The conditions under
  62. which the environment of the
  63. \fI_setjmp\fR()
  64. no longer exists include exiting the function that contains the
  65. \fI_setjmp\fR()
  66. call, and exiting an inner block with temporary storage. This
  67. condition might not be detectable, in which case the
  68. \fI_longjmp\fR()
  69. occurs and, if the environment no longer exists, the contents of the
  70. temporary storage of an inner block are unpredictable. This condition
  71. might also cause unexpected process termination. If the function has
  72. returned, the results are undefined.
  73. .P
  74. Passing
  75. \fIlongjmp\fR()
  76. a pointer to a buffer not created by
  77. \fIsetjmp\fR(),
  78. passing
  79. \fI_longjmp\fR()
  80. a pointer to a buffer not created by
  81. \fI_setjmp\fR(),
  82. passing
  83. \fIsiglongjmp\fR()
  84. a pointer to a buffer not created by
  85. \fIsigsetjmp\fR(),
  86. or passing any of these three functions a buffer that has been modified
  87. by the user can cause all the problems listed above, and more.
  88. .P
  89. The
  90. \fI_longjmp\fR()
  91. and
  92. \fI_setjmp\fR()
  93. functions are included to support programs written to historical system
  94. interfaces. New applications should use
  95. \fIsiglongjmp\fR()
  96. and
  97. \fIsigsetjmp\fR()
  98. respectively.
  99. .SH RATIONALE
  100. None.
  101. .SH "FUTURE DIRECTIONS"
  102. The
  103. \fI_longjmp\fR()
  104. and
  105. \fI_setjmp\fR()
  106. functions may be removed in a future version.
  107. .SH "SEE ALSO"
  108. .IR "\fIlongjmp\fR\^(\|)",
  109. .IR "\fIsetjmp\fR\^(\|)",
  110. .IR "\fIsiglongjmp\fR\^(\|)",
  111. .IR "\fIsigsetjmp\fR\^(\|)"
  112. .P
  113. The Base Definitions volume of POSIX.1\(hy2017,
  114. .IR "\fB<setjmp.h>\fP"
  115. .\"
  116. .SH COPYRIGHT
  117. Portions of this text are reprinted and reproduced in electronic form
  118. from IEEE Std 1003.1-2017, Standard for Information Technology
  119. -- Portable Operating System Interface (POSIX), The Open Group Base
  120. Specifications Issue 7, 2018 Edition,
  121. Copyright (C) 2018 by the Institute of
  122. Electrical and Electronics Engineers, Inc and The Open Group.
  123. In the event of any discrepancy between this version and the original IEEE and
  124. The Open Group Standard, the original IEEE and The Open Group Standard
  125. is the referee document. The original Standard can be obtained online at
  126. http://www.opengroup.org/unix/online.html .
  127. .PP
  128. Any typographical or formatting errors that appear
  129. in this page are most likely
  130. to have been introduced during the conversion of the source files to
  131. man page format. To report such errors, see
  132. https://www.kernel.org/doc/man-pages/reporting_bugs.html .