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

setjmp.3p (3362B)


  1. '\" et
  2. .TH SETJMP "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. setjmp
  12. \(em set jump point for a non-local goto
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <setjmp.h>
  17. .P
  18. int setjmp(jmp_buf \fIenv\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The functionality described on this reference page is aligned with the
  22. ISO\ C standard. Any conflict between the requirements described here and the
  23. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  24. .P
  25. A call to
  26. \fIsetjmp\fR()
  27. shall save the calling environment in its
  28. .IR env
  29. argument for later use by
  30. \fIlongjmp\fR().
  31. .P
  32. It is unspecified whether
  33. \fIsetjmp\fR()
  34. is a macro or a function. If a macro definition is suppressed in order
  35. to access an actual function, or a program defines an external
  36. identifier with the name
  37. .IR setjmp ,
  38. the behavior is undefined.
  39. .P
  40. An application shall ensure that an invocation of
  41. \fIsetjmp\fR()
  42. appears in one of the following contexts only:
  43. .IP " *" 4
  44. The entire controlling expression of a selection or iteration
  45. statement
  46. .IP " *" 4
  47. One operand of a relational or equality operator with the other operand
  48. an integral constant expression, with the resulting expression being
  49. the entire controlling expression of a selection or iteration statement
  50. .IP " *" 4
  51. The operand of a unary
  52. .BR '!'
  53. operator with the resulting expression being the entire controlling
  54. expression of a selection or iteration
  55. .IP " *" 4
  56. The entire expression of an expression statement (possibly cast to
  57. .BR void )
  58. .P
  59. If the invocation appears in any other context, the behavior is
  60. undefined.
  61. .SH "RETURN VALUE"
  62. If the return is from a direct invocation,
  63. \fIsetjmp\fR()
  64. shall return 0. If the return is from a call to
  65. \fIlongjmp\fR(),
  66. \fIsetjmp\fR()
  67. shall return a non-zero value.
  68. .SH ERRORS
  69. No errors are defined.
  70. .LP
  71. .IR "The following sections are informative."
  72. .SH EXAMPLES
  73. None.
  74. .SH "APPLICATION USAGE"
  75. In general,
  76. \fIsigsetjmp\fR()
  77. is more useful in dealing with errors and interrupts encountered in a
  78. low-level subroutine of a program.
  79. .SH RATIONALE
  80. None.
  81. .SH "FUTURE DIRECTIONS"
  82. None.
  83. .SH "SEE ALSO"
  84. .IR "\fIlongjmp\fR\^(\|)",
  85. .IR "\fIsigsetjmp\fR\^(\|)"
  86. .P
  87. The Base Definitions volume of POSIX.1\(hy2017,
  88. .IR "\fB<setjmp.h>\fP"
  89. .\"
  90. .SH COPYRIGHT
  91. Portions of this text are reprinted and reproduced in electronic form
  92. from IEEE Std 1003.1-2017, Standard for Information Technology
  93. -- Portable Operating System Interface (POSIX), The Open Group Base
  94. Specifications Issue 7, 2018 Edition,
  95. Copyright (C) 2018 by the Institute of
  96. Electrical and Electronics Engineers, Inc and The Open Group.
  97. In the event of any discrepancy between this version and the original IEEE and
  98. The Open Group Standard, the original IEEE and The Open Group Standard
  99. is the referee document. The original Standard can be obtained online at
  100. http://www.opengroup.org/unix/online.html .
  101. .PP
  102. Any typographical or formatting errors that appear
  103. in this page are most likely
  104. to have been introduced during the conversion of the source files to
  105. man page format. To report such errors, see
  106. https://www.kernel.org/doc/man-pages/reporting_bugs.html .