Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/lib/ape/man/3/_setjmp

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "_LONGJMP" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" _longjmp 
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.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 .

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.