The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

sigsetjmp - set jump point for a non-local goto

 SYNOPSIS



#include <setjmp.h>

int sigsetjmp(sigjmp_buf env, int savemask);

 DESCRIPTION

A call to sigsetjmp() saves the calling environment in its env argument for later use by siglongjmp(). It is unspecified whether sigsetjmp() is a macro or a function. If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with the name sigsetjmp the behaviour is undefined.

If the value of the savemask argument is not 0, sigsetjmp() will also save the current signal mask of the calling thread as part of the calling environment.

All accessible objects have values as of the time siglongjmp() was called, except that the values of objects of automatic storage duration which are local to the function containing the invocation of the corresponding sigsetjmp() which do not have volatile-qualified type and which are changed between the sigsetjmp() invocation and siglongjmp() call are indeterminate.

An invocation of sigsetjmp() must appear in one of the following contexts only:

 RETURN VALUE

If the return is from a successful direct invocation, sigsetjmp() returns 0. If the return is from a call to siglongjmp(), sigsetjmp() returns a non-zero value.

 ERRORS

No errors are defined.

 EXAMPLES

None.

 APPLICATION USAGE

The distinction between setjmp()/longjmp() and sigsetjmp()/siglongjmp() is only significant for programs which use sigaction(), sigprocmask() or sigsuspend().

 FUTURE DIRECTIONS

None.

 SEE ALSO

siglongjmp(), signal(), sigprocmask(), sigsuspend(), <setjmp.h>.

DERIVATION

Derived from the POSIX.1-1988 standard.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]