Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

_longjmp, _setjmp - non-local jump (without signal mask)

&pagelevel(4)&pagelevel

Syntax

#include <setjmp.h>

void _longjmp(jmp_buf env, int val);

int _setjmp(jmp_buf env);

Description

The _longjmp() and _setjmp() functions are identical to longjmp() and setjmp()
respectively, except that they leave the signal mask unchanged.

If _longjmp() is called without env having been previously initialized by _setjmp(), or if the
last _setjmp() call was in a function which has returned in the meantime, the behavior is
undefined.

Return val.

See longjmp() and setjmp().

Notes

Errors can occur if _longjmp() is executed and the environment in which _setjmp() was
executed no longer exists. The environment of the _setjmp() call no longer exists if the
function containing the call terminates, or leaves the save area with the automatic variables.
This error might not be detected, which leads to _longjmp() being executed. In this case
the contents of the save area are unpredictable. This error can also cause the process to
terminate. When the function returns, the result is undefined.

If a pointer to an area that was not generated by setjmp(), _setjmp() or sigsetjmp()
is passed to longjmp(), _longjmp() or siglongjmp(), or if the area was changed by the
user, the errors described above as well as addition problems can occur.

_longjmp() and _setjmp() are offered for reasons of compatibility. New applications
should use siglongjmp() or sigsetjmp().

See also

longjmp(), setjmp(), siglongjmp(), sigsetjmp(), setjmp.h.