Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigset(3) — GENIX 4.1A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigsys(2)

signal(2)

jobs(3)

tty(4)



      SIGSET(3)               GENIX Programmer's Manual               SIGSET(3)



      NAME
           sigset, signal, sighold, sigignore, sigrelse, sigpause - manage sig-
           nals

      SYNOPSIS
           #include <signal.h>
           void action();
           int sig;

           sigset(sig, action)
           signal(sig, action)

           sighold(sig)
           sigignore(sig)
           sigrelse(sig)

           sigpause(sig)

           cc ... -ljobs

      DESCRIPTION
           This is a package of signal management functions to manage the  sig-
           nals  as described in sigsys(2).  These functions are available only
           in this version of UNIX, and should not be used when the  mechanisms
           of  signal(2)  would suffice, as they would then impair portability.
           These functions are contained  in  the  jobs  library,  obtained  by
           specifying the loader option -ljobs.

           Sigset is used to provide a default signal handler for  signal  sig.
           This  function  is  remembered  across subsequent calls to the other
           functions, and need not be specified again.  After sigset  instances
           of  sig will cause an interrupt to be taken at func, with the signal
           then held so that recursive trapping due  to  the  signal  will  not
           occur.  During normal return from func, the routines arrange for the
           signal action to be restored so that subsequent  signals  will  also
           trap to func. If a non-local exit is to be taken, then sigrelse must
           be called to un-hold  the  signal  action,  restoring  the  original
           catch.   Func may also be specified as SIG_DFL, SIG_IGN or SIG_HOLD,
           as described in sigsys(2).  The value specified on the previous call
           to  sigset  is  returned;  if sigset has never been called, then the
           default action inherited from the system is returned.

           Signal is like sigset, but the signal will  not  be  held  when  the
           action  routine  is called; rather it will have reverted to SIG_DFL.
           This is generally unsafe, but is included for backwards  compatibil-
           ity to the old signal mechanism.  It should not be used.

           Sighold and sigrelse may be used to block off sig in a piece of code
           where  it  cannot  be tolerated.  After sigrelse the catch initially
           set with sigset will be restored.





      Printed 11/16/83                                                        1





      SIGSET(3)               GENIX Programmer's Manual               SIGSET(3)



           Sigignore can be used to temporarily  set  the  action  for  sig  to
           ignore  the  signal.  If the signal had been held before the call to
           sigignore, any pending instance of the signal will be discarded.

           Sigpause may be used by a routine which wishes  to  check  for  some
           condition produced at interrupt level by the sig signal, and then to
           pause waiting for the condition to arise with the catch of the  sig-
           nal enabled.  In correct usage it must be preceded by an instance of
           sighold to block the signal.  Sigpause is like pause in that it will
           return after any signal is processed.  The usual thing to do then is
           to reenable the hold with sighold, check the  condition  again,  and
           sigpause again if the condition has not arisen.

      SEE ALSO
           sigsys(2), signal(2), jobs(3), tty(4)

      BUGS
           Sighold and sigrelse do not nest; the first  sigrelse  restores  the
           default catch.

           These functions store information in data space.  You thus must call
           sigsys(2)  rather  than  any of sigset or signal after a vfork(2) in
           the child which is to then exec(2).
































      Printed 11/16/83                                                        2



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