Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ssignal(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

signal(S)

sigset(S)


 ssignal(S)                     6 January 1993                     ssignal(S)


 Name

    ssignal, gsignal - software signals

 Syntax


    cc  . . .  -lc


    #include  <signal.h>

    int (*ssignal (sig, action))()
    int sig, (*action)();

    int gsignal (sig)
    int sig;


 Description

    The ssignal and gsignal functions implement a software facility similar
    to signal(S).  This facility enables users to indicate the disposition of
    error conditions.

    Software signals made available to users are associated with integers in
    the inclusive range 1 through 16.  A call to ssignal associates a pro-
    cedure, action, with the software signal sig; the software signal, sig,
    is raised by a call to gsignal.  Raising a software signal causes the
    action established for that signal to be taken.

    The first argument to ssignal is a number identifying the type of signal
    for which an action is to be established. The second argument defines the
    action; it is either the name of a (user-defined) action function or one
    of the manifest constants SIGDFL (default) or SIGIGN (ignore).  The
    ssignal function returns the action previously established for that sig-
    nal type; if no action has been established or the signal number is ille-
    gal, ssignal returns SIGDFL.

    The gsignal function raises the signal identified by its argument, sig:

    +  If an action function has been established for sig, then that action
       is reset to SIGDFL and the action function is entered with argument
       sig.  gsignal returns the value returned to it by the action function.

    +  If the action for sig is SIGIGN, gsignal returns the value 1 and
       takes no other action.

    +  If the action for sig is SIGDFL, gsignal returns the value 0 and
       takes no other action.

    If sig has an illegal value or no action was ever specified for sig,
    gsignal returns the value 0 and takes no other action.


 See also

    signal(S), sigset(S)

 Standards conformance

    gsignal and ssignal are conformant with:
    AT&T SVID Issue 2; however, both routines have been withdrawn from XPG3.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026