Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ siginfo(5) — Atari System V 1.1-06

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigaction(2)

waitid(2)

signal(5)





   siginfo(5)                                                       siginfo(5)


   NAME
         siginfo - signal generation information

   SYNOPSIS
         #include <siginfo.h>

   DESCRIPTION
         If a process is catching a signal, it may request information that
         tells why the system generated that signal [see sigaction(2)].  If a
         process is monitoring its children, it may receive information that
         tells why a child changed state [see waitid(2)].  In either case, the
         system returns the information in a structure of type siginfot,
         which includes the following information:

               int sisigno         /* signal number */
               int sierrno         /* error number */
               int sicode          /* signal code */
               int simachinexcep   /* signal generated as
                                     * a result of hardware exception */

         sisigno contains the system-generated signal number.  (For the
         waitid(2) function, sisigno is always SIGCHLD.)

         If sierrno is non-zero, it contains an error number associated with
         this signal, as defined in errno.h.

         sicode contains a code identifying the cause of the signal.  If the
         value of sicode is less than or equal to 0, then the signal was
         generated by a user process [see kill(2) and sigsend(2)] and the
         siginfo structure contains the following additional information:

               pidt sipid      /* sending process ID */
               uidt siuid      /* sending user ID */

         Otherwise, sicode contains a signal-specific reason why the signal
         was generated, as follows:

              Signal    Code            Reason
              __________________________________________________________
              SIGILL    ILLILLOPC      illegal opcode
                        ILLPRVOPC      privileged opcode
              __________________________________________________________
              SIGFPE    FPEINTDIV      integer divide by zero
                        FPEINTOVF      integer overflow
                        FPEFLTDIV      floating point divide by zero
                        FPEFLTOVF      floating point overflow
                        FPEFLTUND      floating point underflow
                        FPEFLTRES      floating point inexact result
                        FPEFLTINV      invalid floating point operation
                        FPEFLTSUB      subscript out of range
                        FPEPRIVIO      FP privilege violation


   8/91                                                                 Page 1









   siginfo(5)                                                       siginfo(5)


                        FPEUNIMPL      FP unimplemented opcode
                        FPEFTLNAN      FP NaN operand
              __________________________________________________________
              SIGSEGV   SEGVCODE       code access
                        SEGVDATA       data access
              __________________________________________________________
              SIGBUS    BUSALIGN       misaligned data access
                        BUSPROT        protection violation
              __________________________________________________________
              SIGTRAP   TRAPBRKPT      process breakpoint
                        TRAPTRACE      process trace trap
              __________________________________________________________
              SIGCHLD   CLDEXITED      child has exited
                        CLDKILLED      child was killed
                        CLDDUMPED      child terminated abnormally
                        CLDTRAPPED     traced child has trapped
                        CLDSTOPPED     child has stopped
                        CLDCONTINUED   stopped child had continued
              __________________________________________________________
              SIGPOLL   POLLIN         data input available
                        POLLOUT        output buffers available
                        POLLMSG        input message available
                        POLLERR        I/O error
                        POLLPRI        high priority input available
                        POLLHUP        device disconnected

         In addition, the following signal-dependent information is available
         for kernel-generated signals:

            Signal        Field                      Value
            ______________________________________________________________
            SIGCHLD   pidt sipid    child process ID
                      int sistatus   exit value or signal
            ______________________________________________________________
            SIGPOLL   long siband    band event for POLLIN, POLLOUT, or
                                      POLLMSG

   NOTES
         For SIGCHLD signals, if sicode is equal to CLDEXITED, then
         sistatus is equal to the exit value of the process; otherwise, it is
         equal to the signal that caused the process to change state.  If
         simachinexcep is non zero, the signal was generated as a result of a
         machine exception.  The signals that an exception may give rise to
         are SIGSEGV, SIGILL, SIGBUS, SIGTRAP and SIGFPE.  When one of these
         signals delivered as a result of a machine exception, one or more
         exception blocks containing relevant information is also made
         available through the siginfo structure.  sincodes contains the
         number of exception blocks available, and siexblks points to an
         array of exception blocks containing sincodes elements.  The
         contents of an exception block are the signal number, ebsigno (the
         same as sisigno), the exception code, ebcode (one of those listed


   Page 2                                                                 8/91









   siginfo(5)                                                       siginfo(5)


         above), and signal-specific information, ebregisters.  ebregister
         contains valid information only for SIGSEGV, SIGBUS and SIGFPE.

         For SIGSEGV and SIGBUS, the address, transaction and data registers
         of the faulting data-pipe stage are available in ebdma, ebdmt and
         ebdmd, respectively.

         For SIGFPE imprecise exception codes, the high and low words of the
         floating point result are available in ebfprh and ebfprl, and the
         floating point imprecise operation type register is available in
         ebfpit.

   SEE ALSO
         sigaction(2), waitid(2), signal(5).







































   8/91                                                                 Page 3





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