summaryrefslogtreecommitdiffstats
path: root/man3p/_setjmp.3p
diff options
context:
space:
mode:
Diffstat (limited to 'man3p/_setjmp.3p')
-rw-r--r--man3p/_setjmp.3p84
1 files changed, 84 insertions, 0 deletions
diff --git a/man3p/_setjmp.3p b/man3p/_setjmp.3p
new file mode 100644
index 000000000..8ddc0c897
--- /dev/null
+++ b/man3p/_setjmp.3p
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "_LONGJMP" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" _longjmp
+.SH NAME
+_longjmp, _setjmp \- non-local goto
+.SH SYNOPSIS
+.LP
+\fB#include <setjmp.h>
+.br
+.sp
+void _longjmp(jmp_buf\fP \fIenv\fP\fB, int\fP \fIval\fP\fB);
+.br
+int _setjmp(jmp_buf\fP \fIenv\fP\fB); \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions shall be equivalent
+to \fIlongjmp\fP() and \fIsetjmp\fP(), respectively, with the
+additional restriction that \fI_longjmp\fP() and \fI_setjmp\fP() shall
+not manipulate the signal mask.
+.LP
+If \fI_longjmp\fP() is called even though \fIenv\fP was never initialized
+by a call to \fI_setjmp\fP(), or when the last such
+call was in a function that has since returned, the results are undefined.
+.SH RETURN VALUE
+.LP
+Refer to \fIlongjmp\fP() and \fIsetjmp\fP() .
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.LP
+None.
+.SH APPLICATION USAGE
+.LP
+If \fI_longjmp\fP() is executed and the environment in which \fI_setjmp\fP()
+was executed no longer exists, errors can occur.
+The conditions under which the environment of the \fI_setjmp\fP()
+no longer exists include exiting the function that contains the
+\fI_setjmp\fP() call, and exiting an inner block with temporary storage.
+This condition might not be detectable, in which case the
+\fI_longjmp\fP() occurs and, if the environment no longer exists,
+the contents of the temporary storage of an inner block are
+unpredictable. This condition might also cause unexpected process
+termination. If the function has returned, the results are
+undefined.
+.LP
+Passing \fIlongjmp\fP() a pointer to a buffer not created by \fIsetjmp\fP(),
+passing \fI_longjmp\fP() a pointer to a buffer not created by \fI_setjmp\fP(),
+passing \fIsiglongjmp\fP() a pointer to a buffer not created by \fIsigsetjmp\fP(),
+or passing any of these three functions a buffer that has been modified
+by
+the user can cause all the problems listed above, and more.
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions are included to
+support programs written to historical system interfaces.
+New applications should use \fIsiglongjmp\fP() and \fIsigsetjmp\fP()
+respectively.
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+The \fI_longjmp\fP() and \fI_setjmp\fP() functions may be marked LEGACY
+in a future version.
+.SH SEE ALSO
+.LP
+\fIlongjmp\fP() , \fIsetjmp\fP() , \fIsiglongjmp\fP() , \fIsigsetjmp\fP()
+, the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, \fI<setjmp.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .