Name

setjmp function — Establishes nonlocal label

Synopsis

int setjmp(jmp_buf env);

The setjmp function stores the current execution environment in its argument so that the environment can be restored by a call to longjmp. The first time setjmp is called, it returns 0. When longjmp is called, setjmp returns the val argument that was passed to longjmp; that value is guaranteed to be nonzero.

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.