HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)

s
setjmp(3C) setjmp(3C)
Some implementations of Pascal support a ‘‘try/recover’’ mechanism, which also creates stack marker infor-
mation. If a longjmp() operation occurs in a scope which is nested inside a try/recover, and the
corresponding
setjmp() is not inside the scope of the try/recover, the recover block will not be executed
and the currently active recover block will become the one enclosing the
setjmp(), if one exists.
WARNINGS
A call to
longjmp() to leave the guaranteed stack space reserved by
sigspace() might remove the
guarantee that the ordinary execution of the program will not extend into the guaranteed space. It might
also cause the program to forever lose its ability to automatically increase the stack size, and the program
might then be limited to the guaranteed space.
The result of using
setjmp() within an expression can be unpredictable.
If longjmp() is called even though env was never primed by a call to
setjmp(), or when the last such
call was in a function that has since returned, total chaos is guaranteed.
The effect of a call to
longjmp() where the initialization of the
jmp_buf argument was not performed
in the calling thread is undefined. The effect of a call to
siglongjmp() where the initialization of the
sigjmp_buf argument was not performed in the calling thread is undefined.
The contents of the jmp_buf buffer are architecture and compilation environment specific. Thus, objects
built using these functions may not be supported across architectures.
AUTHOR
setjmp() was developed by AT&T and HP.
SEE ALSO
sigaction(2), sigblock(2), signal(5), sigprocmask(2), sigsetmask(2), sigspace(2), sigsuspend(2), sigvector(2),
thread_safety(5).
STANDARDS CONFORMANCE
setjmp(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
longjmp(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
siglongjmp() : AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
sigsetjmp() : AES, SVID3, XPG3, XPG4, FIPS 151-2, POSIX.1
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 3877