mirror of https://github.com/mkerrisk/man-pages
setjmp.3: Clarify when setjmp() provides BSD vs System V signal mask semantics
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
1192ed9476
commit
e739a26839
|
@ -40,6 +40,9 @@ Feature Test Macro Requirements for glibc (see
|
|||
.BR feature_test_macros (7)):
|
||||
.in
|
||||
.sp
|
||||
.BR setjmp ():
|
||||
see NOTES.
|
||||
.br
|
||||
.BR sigsetjmp ():
|
||||
_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_C_SOURCE
|
||||
.SH DESCRIPTION
|
||||
|
@ -82,9 +85,22 @@ POSIX.1-2001 specifies
|
|||
POSIX does not specify whether
|
||||
.BR setjmp ()
|
||||
will save the signal signal mask.
|
||||
(In System V it will not.
|
||||
In System V it will not.
|
||||
In 4.3BSD it will, and there
|
||||
is a function \fB_setjmp\fP that will not.)
|
||||
is a function \fB_setjmp\fP that will not.
|
||||
By default, Linux/glibc follows the System V behavior,
|
||||
but the BSD behavior is provided if the
|
||||
.BR _BSD_SOURCE
|
||||
feature test macro is defined and none of
|
||||
.BR _POSIX_SOURCE ,
|
||||
.BR _POSIX_C_SOURCE ,
|
||||
.BR _XOPEN_SOURCE ,
|
||||
.BR _XOPEN_SOURCE_EXTENDED ,
|
||||
.BR _GNU_SOURCE ,
|
||||
or
|
||||
.B _SVID_SOURCE
|
||||
is defined.
|
||||
|
||||
If you want to portably save and restore signal masks, use
|
||||
.BR sigsetjmp ()
|
||||
and
|
||||
|
|
Loading…
Reference in New Issue