|SIGSETJMP(3P)||POSIX Programmer's Manual||SIGSETJMP(3P)|
int sigsetjmp(sigjmp_buf env, int savemask);
- References to setjmp() are equivalent to sigsetjmp().
- References to longjmp() are equivalent to siglongjmp().
- If the value of the savemask argument is not 0, sigsetjmp() shall also save the current signal mask of the calling thread as part of the calling environment.
The following sections are informative.
Note that since this function is defined in terms of setjmp(), if savemask is zero, it is unspecified whether the signal mask is saved.
There are processors that cannot easily support these calls, but this was not considered a sufficient reason to exclude them.
4.2 BSD, 4.3 BSD, and XSI-conformant systems provide functions named _setjmp() and _longjmp() that, together with setjmp() and longjmp(), provide the same functionality as sigsetjmp() and siglongjmp(). On those systems, setjmp() and longjmp() save and restore signal masks, while _setjmp() and _longjmp() do not. On System V Release 3 and in corresponding issues of the SVID, setjmp() and longjmp() are explicitly defined not to save and restore signal masks. In order to permit existing practice in both cases, the relation of setjmp() and longjmp() to signal masks is not specified, and a new set of functions is defined instead.
The longjmp() and siglongjmp() functions operate as in the previous issue provided the matching setjmp() or sigsetjmp() 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.
The Base Definitions volume of POSIX.1‐2017, <setjmp.h>
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|2017||IEEE/The Open Group|