OSDN Git Service

(split) LDP: Update original to LDP v3.63
[linuxjm/LDP_man-pages.git] / original / man3 / setjmp.3
index 65d8e33..8dae4ad 100644 (file)
@@ -24,7 +24,7 @@
 .\" Added sigsetjmp, Sun Mar  2 22:03:05 EST 1997, jrv@vanzandt.mv.com
 .\" Modifications, Sun Feb 26 14:39:45 1995, faith@cs.unc.edu
 .\" "
-.TH SETJMP 3 2009-06-26 "" "Linux Programmer's Manual"
+.TH SETJMP 3 2014-01-07 "" "Linux Programmer's Manual"
 .SH NAME
 setjmp, sigsetjmp \- save stack context for nonlocal goto
 .SH SYNOPSIS
@@ -93,13 +93,17 @@ POSIX.1-2001 specifies
 .SH NOTES
 POSIX does not specify whether
 .BR setjmp ()
-will save the signal mask.
+will save the signal mask
+(to be later restored during
+.BR longjmp (3)).
 In System V it will not.
 In 4.3BSD it will, and there
 is a function
 .B _setjmp
 that will not.
-By default, Linux/glibc follows the System V behavior,
+On Linux with glibc versions before 2.19,
+.BR setjmp ()
+follows the System V behavior by default,
 but the BSD behavior is provided if the
 .BR _BSD_SOURCE
 feature test macro is defined and none of
@@ -111,6 +115,17 @@ feature test macro is defined and none of
 or
 .B _SVID_SOURCE
 is defined.
+Since glibc 2.19,
+.IR <setjmp.h>
+exposes only the System V version of
+.BR setjmp ().
+Programs that need the BSD semantics should replace calls to
+.BR setjmp ()
+with calls to
+.BR sigsetjmp ()
+with a nonzero
+.I savesigs
+argument.
 
 If you want to portably save and restore signal masks, use
 .BR sigsetjmp ()