[Previous] [Contents] [Next]

siglongjmp()

Restore the environment saved by sigsetjmp(), including the signal mask

Synopsis:

#include <setjmp.h>

void siglongjmp( sigjmp_buf env, 
                 int val );

Library:

libc

Description:

The siglongjmp() function is a superset of the longjmp() function, but also restores the process's saved signal mask if (and only if) one was saved in the env argument by a previous call to sigsetjmp().


WARNING:

Don't use longjmp() or siglongjmp() to restore an environment saved by a call to setjmp() or sigsetjmp() in another thread. If you're lucky, your application will crash; if not, it'll look as if it works for a while, until random scribbling on the stack causes it to crash.


Returns:

The same values that longjmp() returns.

Examples:

See longjmp().

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

longjmp(), sigaction(), sigprocmask(), sigsuspend()


[Previous] [Contents] [Next]