#include <setjmp.h>
int setjmp(jmp_buf env);
setjmp() saves the current program state in the environment buffer env and returns zero. This buffer can be used as a parameter to a later call to longjmp(), which then restores the program state and jumps back to the location of setjmp(). This time, setjmp() returns a non-zero value, which is equal to the second parameter to longjmp().
Zero if called directly. Non-zero if called by longjmp().