MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                          ssignal(3C)



NAME
     ssignal, gsignal - software signals

SYNOPSIS
     #include 

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


     int gsignal(int sig);


DESCRIPTION
     The ssignal() and gsignal() functions implement  a  software
     facility similar to signal(3C). This facility is made avail-
     able to users for their own purposes.

  ssignal()
     Software signals made available to users are associated with
     integers  in  the  inclusive  range  1 through 17. A call to
     ssignal() associates a procedure, action, with the  software
     signal sig; the software signal, sig, is raised by a call to
     gsignal(). Raising a software signal causes the action esta-
     blished 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 con-
     stants SIGDFL (default) or SIGIGN (ignore). The  ssignal()
     function  returns the action previously established for that
     signal type; if no action has been established or the signal
     number is illegal, ssignal() returns SIGDFL.

  gsignal()
     The gsignal() 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. The  gsignal()  function  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.



SunOS 5.11          Last change: 29 Dec 1996                    1






Standard C Library Functions                          ssignal(3C)



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

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Unsafe                      
    


SEE ALSO
     raise(3C), signal(3C), attributes(5)




































SunOS 5.11          Last change: 29 Dec 1996                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™