diff options
Diffstat (limited to 'man3p/sigsetjmp.3p')
-rw-r--r-- | man3p/sigsetjmp.3p | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/man3p/sigsetjmp.3p b/man3p/sigsetjmp.3p new file mode 100644 index 000000000..627f9cacd --- /dev/null +++ b/man3p/sigsetjmp.3p @@ -0,0 +1,103 @@ +.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved +.TH "SIGSETJMP" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" +.\" sigsetjmp +.SH NAME +sigsetjmp \- set jump point for a non-local goto +.SH SYNOPSIS +.LP +\fB#include <setjmp.h> +.br +.sp +int sigsetjmp(sigjmp_buf\fP \fIenv\fP\fB, int\fP \fIsavemask\fP\fB); +\fP +\fB +.br +\fP +.SH DESCRIPTION +.LP +The \fIsigsetjmp\fP() function shall be equivalent to the \fIsetjmp\fP() +function, +except as follows: +.IP " *" 3 +References to \fIsetjmp\fP() are equivalent to \fIsigsetjmp\fP(). +.LP +.IP " *" 3 +References to \fIlongjmp\fP() are equivalent to \fIsiglongjmp\fP(). +.LP +.IP " *" 3 +If the value of the \fIsavemask\fP argument is not 0, \fIsigsetjmp\fP() +shall also save the current signal mask of the calling +thread as part of the calling environment. +.LP +.SH RETURN VALUE +.LP +If the return is from a successful direct invocation, \fIsigsetjmp\fP() +shall return 0. If the return is from a call to \fIsiglongjmp\fP(), +\fIsigsetjmp\fP() shall return a non-zero value. +.SH ERRORS +.LP +No errors are defined. +.LP +\fIThe following sections are informative.\fP +.SH EXAMPLES +.LP +None. +.SH APPLICATION USAGE +.LP +The distinction between \fIsetjmp\fP()/ \fIlongjmp\fP() and \fIsigsetjmp\fP()/ +\fIsiglongjmp\fP() is only significant for programs which use \fIsigaction\fP(), +\fIsigprocmask\fP(), or \fIsigsuspend\fP(). +.LP +Note that since this function is defined in terms of \fIsetjmp\fP(), +if \fIsavemask\fP +is zero, it is unspecified whether the signal mask is saved. +.SH RATIONALE +.LP +The ISO\ C standard specifies various restrictions on the usage of +the \fIsetjmp\fP() macro in order to permit implementors to recognize +the name in the compiler and not +implement an actual function. These same restrictions apply to the +\fIsigsetjmp\fP() macro. +.LP +There are processors that cannot easily support these calls, but this +was not considered a sufficient reason to exclude +them. +.LP +4.2 BSD, 4.3 BSD, and XSI-conformant systems provide functions named +\fI_setjmp\fP() +and \fI_longjmp\fP() that, together with \fIsetjmp\fP() and \fIlongjmp\fP(), +provide the same +functionality as \fIsigsetjmp\fP() and \fIsiglongjmp\fP(). On those +systems, \fIsetjmp\fP() and \fIlongjmp\fP() save and restore signal +masks, while \fI_setjmp\fP() and \fI_longjmp\fP() do not. On System +V Release 3 and in corresponding issues of the SVID, \fIsetjmp\fP() +and \fIlongjmp\fP() are explicitly defined +not to save and restore signal masks. In order to permit existing +practice in both cases, the relation of \fIsetjmp\fP() and \fIlongjmp\fP() +to signal masks is not +specified, and a new set of functions is defined instead. +.LP +The \fIlongjmp\fP() and \fIsiglongjmp\fP() +functions operate as in the previous issue provided the matching \fIsetjmp\fP() +or +\fIsigsetjmp\fP() has been performed in the same thread. Non-local +jumps into contexts saved by other threads would be at best a +questionable practice and were not considered worthy of standardization. +.SH FUTURE DIRECTIONS +.LP +None. +.SH SEE ALSO +.LP +\fIsiglongjmp\fP() , \fIsignal\fP() , \fIsigprocmask\fP() , \fIsigsuspend\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 . |