poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / setjmp.texi
blob51b617d4084f3e3d97ba53c5abc41ea621ecdae0
1 @node setjmp
2 @section @code{setjmp}
3 @findex setjmp
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/setjmp.html}
7 Gnulib module: ---
9 Portability problems fixed by Gnulib:
10 @itemize
11 @end itemize
13 Portability problems not fixed by Gnulib:
14 @itemize
15 @item
16 POSIX does not specify whether @code{setjmp} saves the signal mask in the
17 @code{jmp_buf}.  It does on BSD platforms, and on glibc platforms when
18 @code{_BSD_SOURCE} (and/or @code{_DEFAULT_SOURCE} on glibc >= 2.19) is defined;
19 in this case @code{setjmp} behaves like @code{sigsetjmp(.,1)}, and functions
20 @code{_setjmp} and @code{_longjmp} are available that don't save or restore
21 the signal mask.  On System V platforms (excluding HP-UX), and on glibc
22 platforms by default, @code{setjmp} doesn't save the signal mask.
23 @end itemize