setjmp man page on 4.4BSD

Man page or keyword search:  
man Server   1065 pages
apropos Keyword Search (all sections)
Output format
4.4BSD logo
[printable version]

SETJMP(3)		 BSD Library Functions Manual		     SETJMP(3)

     sigsetjmp, siglongjmp, setjmp, longjmp, _setjmp, _longjmp longjmperror —
     non-local jumps

     #include <setjmp.h>

     sigsetjmp(sigjmp_buf env, int savemask);

     siglongjmp(sigjmp_buf env, int val);

     setjmp(jmp_buf env);

     longjmp(jmp_buf env, int val);

     _setjmp(jmp_buf env);

     _longjmp(jmp_buf env, int val);


     The sigsetjmp(), setjmp(), and _setjmp() functions save their calling
     environment in env.  Each of these functions returns 0.

     The corresponding longjmp() functions restore the environment saved by
     their most recent respective invocations of the setjmp() function.	 They
     then return so that program execution continues as if the corresponding
     invocation of the setjmp() call had just returned	the value specified by
     val, instead of 0.

     Pairs of calls may be intermixed, i.e. both sigsetjmp() and siglongjmp()
     and setjmp() and longjmp() combinations may be used in the same program,
     however, individual calls may not, e.g. the env argument to setjmp() may
     not be passed to siglongjmp().

     The longjmp() routines may not be called after the routine which called
     the setjmp() routines returns.

     All accessible objects have values as of the time longjmp() routine was
     called, except that the values of objects of automatic storage invocation
     duration that do not have the volatile type and have been changed between
     the setjmp() invocation and longjmp() call are indeterminate.

     The setjmp()/longjmp() pairs save and restore the signal mask while
     _setjmp()/_longjmp() pairs save and restore only the register set and the
     stack.  (See sigmask(2).)

     The sigsetjmp()/siglongjmp() function pairs save and restore the signal
     mask if the argument savemask is non-zero, otherwise only the register
     set and the stack are saved.

     If the contents of the env are corrupted, or correspond to an environment
     that has already returned, the longjmp() routine calls the routine
     longjmperror(3).  If longjmperror() returns the program is aborted (see
     abort(2)).	 The default version of longjmperror() prints the message
     “longjmp botch” to standard error and returns.  User programs wishing to
     exit more gracefully should write their own versions of longjmperror().

     sigaction(2), sigaltstack(2), signal(3)

     The setjmp() and longjmp() functions conform to ANSI X3.159-1989
     (“ANSI C89”).  The sigsetjmp() and siglongjmp() functions conform to IEEE
     Std 1003.1-1988 (“POSIX.1”).

4th Berkeley Distribution	 June 4, 1993	     4th Berkeley Distribution

List of man pages available for 4.4BSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net