unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

SSIGNAL(3)                 Library Functions Manual                 SSIGNAL(3)



NAME
       ssignal, gsignal - software signals

SYNOPSIS
       #include <&lt;signal.h>&gt;

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

       int gsignal (sig)
       int sig;

DESCRIPTION
       ssignal()  and  ssignal() implement a software facility similar to sig-
       nal(3V).

       Software signals made available to users are associated  with  integers
       in  the  inclusive range 1 through 15. A call to ssignal() associates a
       procedure, action, with the software signal sig; the  software  signal,
       sig,  is  raised  by  a  call  to ssignal().  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 SIG_DFL (default)or SIG_IGN
       (ignore).  ssignal() returns the action previously established for that
       signal  type; if no action has been established or the signal number is
       illegal, ssignal() returns SIG_DFL.

       ssignal() raises the signal identified by its argument, sig:

            If an action function has been  established  for  sig,  then  that
            action is reset to SIG_DFL and the action function is entered with
            argument sig.  ssignal() returns the value returned to it  by  the
            action function.

            If  the  action  for sig is SIG_IGN, ssignal() returns the value 1
            and takes no other action.

            If the action for sig is SIG_DFL, ssignal() returns  the  value  0
            and takes no other action.

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

SEE ALSO
       signal(3V)



                                6 October 1987                      SSIGNAL(3)