Unix/Linux Go Back    

Unix Version 7 - man page for setjmp (v7 section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

SETJMP(3)										SETJMP(3)

       setjmp, longjmp - non-local goto

       #include <setjmp.h>

       jmp_buf env;

       longjmp(env, val)
       jmp_buf env;

       These  routines	are  useful  for dealing with errors and interrupts encountered in a low-
       level subroutine of a program.

       Setjmp saves its stack environment in env for later use by longjmp.  It returns value 0.

       Longjmp restores the environment saved by the last call of setjmp.   It	then  returns  in
       such  a	way that execution continues as if the call of setjmp had just returned the value
       val to the function that invoked setjmp, which  must  not  itself  have	returned  in  the
       interim.  All accessible data have values as of the time longjmp was called.


Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 01:48 PM.