Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ siginfo(5) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigaction(2)

waitid(2)

signal(5)



siginfo(5)             MISC. FILE FORMATS              siginfo(5)



NAME
     siginfo - signal generation information

SYNOPSIS
     #include <siginfo.h>

DESCRIPTION
     If a process is catching a signal, it may  request  informa-
     tion  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 */

     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 associ-
     ated 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 sig-
     send(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
             ILLILLOPN      illegal operand
             ILLILLADR      illegal addressing mode
             ILLILLTRP      illegal trap
             ILLPRVOPC      privileged opcode
             ILLPRVREG      privileged register
             ILLCOPROC      coprocessor error
             ILLBADSTK      internal stack error
   _______________________________________________________________
   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



                                                                1





siginfo(5)             MISC. FILE FORMATS              siginfo(5)



             FPEFLTINV      invalid floating point operation
             FPEFLTSUB      subscript out of range
   _______________________________________________________________
   SIGSEGV   SEGVMAPERR     address not mapped to object
             SEGVACCERR     invalid permissions for mapped object
   _______________________________________________________________
   SIGBUS    BUSADRALN      invalid address alignment
             BUSADRERR      non-existent physical address
             BUSOBJERR      object specific hardware error
   _______________________________________________________________
   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
   ________________________________________________________________
   SIGILL    caddrt siaddr   address of faulting instruction
   SIGFPE
   ________________________________________________________________
   SIGSEGV   caddrt siaddr   address of faulting memory reference
   SIGBUS
   ________________________________________________________________
   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; other-
     wise, it is equal to the signal that caused the  process  to
     change  state.  For some implementations, the exact value of
     siaddr may not be  available;  in  that  case,  siaddr  is
     guaranteed  to  be on the same page as the faulting instruc-
     tion or memory reference.



                                                                2





siginfo(5)             MISC. FILE FORMATS              siginfo(5)



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





















































                                                                3



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