sigsetjmp()
Save the environment, including the signal mask
Synopsis:
#include <setjmp.h>
int sigsetjmp( sigjmp_buf env,
int savemask );
Arguments:
- env
- A buffer where the function can save the calling environment.
- savemask
- Nonzero if you want to save the process's current signal mask, otherwise zero.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The sigsetjmp() function behaves in the same way as the setjmp() function when savemask is zero. If savemask is nonzero, then sigsetjmp() also saves the thread's current signal mask as part of the calling environment.
Our current sigsetjmp() macro implementation evaluates its arguments more than once. Do not pass an expression with side effects as its first argument because unexpected behavior may result.
You may call this function only in one of the same contexts that you may call setjmp().
Returns:
Zero if invoked directly, or nonzero if the return is the result of a call to siglongjmp().
Examples:
See longjmp().
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |