sigsetjmp(3P) sigsetjmp(3P)NAME sigsetjmp, siglongjmp - non-local jumps SYNOPSIS #include <setjmp.h> int sigsetjmp(env, savemask) sigjmp_buf env; int savemask; void siglongjmp(env, val) sigjmp_buf env; int val; DESCRIPTION These functions are useful for dealing with errors and in- terrupts encountered in a low-level subroutine of a program. sigsetjmp saves its stack environment in env for later use by siglongjmp. If the value of savemask is not zero, sig- setjmp also saves the process's current signal mask as part of the calling environment. The environment type sigjmp_buf is defined in the <setjmp.h> header file. siglongjmp restores the environment saved by the last call of sigsetjmp with the corresponding env argument. If env was initialized by a call to sigsetjmp with a non-zero value for savemask, siglongjmp also restores the saved signal mask. RETURN VALUE When sigsetjmp has been invoked by the calling process, zero is returned. After siglongjmp is completed, program execution continues as if the corresponding call of sigsetjmp (which must not itself have returned in the interim) had just returned the value val. siglongjmp cannot cause sigsetjmp to return the value zero. If val is zero, sigsetjmp returns 1. All ac- cessible data have values as of the time siglongjmp was called. WARNINGS siglongjmp fails if env was never initialized by a call to sigsetjmp or when the last such call is in a function which has since returned. SEE ALSO sigaction(3P), sigprocmask(3P), sigsuspend(3P). April, 1990 1