siglongjmp()
QNX SDP8.0C Library ReferenceAPIDeveloper
Restore the environment saved by sigsetjmp(), including the signal mask
Synopsis:
#include <setjmp.h>
void siglongjmp( sigjmp_buf env,
int val );
Arguments:
- env
- The environment saved by a previous call to sigsetjmp().
- val
- The value that you want sigsetjmp() to return.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The siglongjmp() function restores the environment saved in the env argument by a previous call to sigsetjmp(). This environment includes the thread's signal mask.
CAUTION:
- The following conditions result in undefined behavior:
- The sigjmp_buf object passed to siglongjmp() was not populated by a previous call to sigsetjmp() made from the same thread.
- The sigjmp_buf object represents an execution context that no longer exists (i.e., the block scope containing the sigsetjmp() call that populated the sigjmp_buf object has ended).
- QNX OS outputs a diagnostic message and terminates the
program abnormally via a SIGABRT signal if:
- You call siglongjmp() on a sigjmp_buf object that has not been populated by a call to setjmp() or sigsetjmp(), or
- the sigjmp_buf was populated via setjmp() or sigsetjmp() but subsequently corrupted.
Returns:
The same values that longjmp() returns.
Examples:
See longjmp().
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: