icon Top 9 categories map      RocketAware > man pages >

setjmp(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

[IEEE Std1003.1-1990 (``POSIX'').]

SETJMP(3)                 OpenBSD Programmer's Manual                SETJMP(3)

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



SYNOPSIS
     #include <setjmp.h>

     int
     sigsetjmp(sigjmp_buf env, int savemask);

     void
     siglongjmp(sigjmp_buf env, int val);

     int
     setjmp(jmp_buf env);

     void
     longjmp(jmp_buf env, int val);

     int
     _setjmp(jmp_buf env);

     void
     _longjmp(jmp_buf env, int val);

     void
     longjmperror(void);

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

     The corresponding longjmp() functions restore the environment saved by
     the most recent invocation of the respective 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()
     as well as 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() function pairs save and restore the signal mask
     while _setjmp()/_longjmp() function pairs save and restore only the reg-
     ister 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.

ERRORS
     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(3)).  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().

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

STANDARDS
     The setjmp() and longjmp() functions conform to ANSI X3.159-1989 (``ANSI
     C''). The sigsetjmp() and siglongjmp() functions conform to IEEE
     Std1003.1-1990 (``POSIX'').

OpenBSD 2.6                      June 4, 1993                                2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for setjmp(3) functions
OpenBSD sources for setjmp(3)


[Overview Topics]

Up to: Current Process Control - control of the currently running process, longjmp, wait, sleep, argument processing


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

[IEEE Std1003.1-1990 (``POSIX'').]




Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > setjmp.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments