MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Headers                                          siginfo.h(3HEAD)



NAME
     siginfo.h, siginfo - signal generation information

SYNOPSIS
     #include 


DESCRIPTION
     If a process is catching a signal,  it might request  infor-
     mation  that tells why the system generated that signal. See
     sigaction(2). If a process is monitoring  its  children,  it
     might  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 */
       union sigval   sivalue        /* signal value */



     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  asso-
     ciated with this signal, as defined in  .


     sicode contains a code identifying the cause of the signal.


     If the value of the  sicode member is  SINOINFO, only  the
     sisigno  member  of  siginfot is meaningful, and the value
     of all other members is unspecified.

  User Signals
     If the value of  sicode is less than or equal  to  0,  then
     the  signal  was  generated by a user process (see  kill(2),
     lwpkill(2),  sigqueue(3C),  sigsend(2),   abort(3C),   and
     raise(3C)) and the  siginfo structure contains the following
     additional information:

       pidt        sipid      /* sending process ID */
       uidt        siuid      /* sending user ID */
       ctidt       sictid     /* sending contract ID */
       zoneidt     sizoneid   /* sending zone ID */S






SunOS 5.11           Last change: 5 Feb 2008                    1






Headers                                          siginfo.h(3HEAD)



     If the signal was generated by a user process, the following
     values are defined for sicode:

     SIUSER        The implementation sets sicode to SIUSER if
                    the  signal  was sent by kill(2), sigsend(2),
                    raise(3C) or abort(3C).


     SILWP         The signal was sent by lwpkill(2).


     SIQUEUE       The signal was sent by sigqueue(3C).


     SITIMER       The signal was generated by the expiration of
                    a timer created by timersettime(3C).


     SIASYNCIO     The signal was generated by the completion of
                    an asynchronous  I/O request.


     SIMESGQ       The signal was generated by the arrival of  a
                    message   on  an  empty  message  queue.  See
                    mqnotify(3C).



     sivalue contains the application specified value, which  is
     passed  to the application's signal-catching function at the
     time of the signal delivery if  sicode is any of  SIQUEUE,
     SITIMER, SIASYNCHIO, or SIMESGQ.

  System Signals
     Non-user generated signals can arise for a  number  of  rea-
     sons.  For  all  of these cases, sicode contains a positive
     value reflecting the reason why  the  system  generated  the
     signal:



     Signal         Code                 Reason
     
     SIGIL         ILILOPC           illegal opcode
                    ILILOPN           illegal operand
                    ILILADR           illegal addressing mode
                    ILILTRP           illegal trap
                    ILPRVOPC           privileged opcode
                    ILPRVREG           privileged register
                    ILCOPROC           co-processor error
                    ILBADSTK           internal stack error
     



SunOS 5.11           Last change: 5 Feb 2008                    2






Headers                                          siginfo.h(3HEAD)



     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
     
     SIGSEGV        SEGVMAPER          address not mapped to object
                    SEGVACER          invalid permissions for mapped object
     
     SIGBUS         BUSADRALN           invalid address alignment
                    BUSADRER           non-existent physical address
                    BUSOBJER           object specific hardware error
     
     SIGTRAP        TRAPBRKPT           process breakpoint
                    TRAPTRACE           process trace trap
     
     SIGCHLD        CLDEXITED           child has exited
                    CLDKILED           child was killed
                    CLDUMPED           child terminated abnormally
                    CLDTRAPED          traced child has trapped
                    CLDSTOPED          child has stopped
                    CLDCONTINUED        stopped child had continued
     
     SIGPOL        POLIN              data input available
                    POLOUT             output buffers available
                    POLMSG             input message available
                    POLER             I/O error
                    POLPRI             high priority input available
                    POLHUP             device disconnected



     Signals can also be generated from the resource control sub-
     system.  Where  these signals do not already possess kernel-
     level siginfo codes, the siginfo sicode will be filled with
     SIRCTL  to indicate a kernel-generated signal from an esta-
     blished resource control value.



        Signal            Code                      Reason
     
     SIGXRES        SIRCTL            resource-control generated signal
     
     SIGHUP
     SIGTERM






SunOS 5.11           Last change: 5 Feb 2008                    3






Headers                                          siginfo.h(3HEAD)



     The uncatchable signals SIGSTOP and SIGKIL  have  undefined
     siginfo codes.


     Signals sent with a siginfo code of  SIRCTL  contain  code-
     dependent information for kernel-generated signals:



        Code              Field                      Value
     
     SIRCTL        hrtime sientity   process-model entity of control



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



        Signal            Field                        Value
     
     SIGIL         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
     
     SIGPOL        long siband        band event for POLIN, POLOUT, or
                                        POLMSG


SEE ALSO
     lwpkill(2), kill(2), setrctl(2), sigaction(2), sigsend(2),
     waitid(2),     abort(3C),    aioread(3C),    mqnotify(3C),
     raise(3C), signal.h(3HEAD), sigqueue(3C),  timercreate(3C),
     timersettime(3C)

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. For some implementations, the exact value
     of siaddr might not be available; in that case, siaddr  is
     guaranteed  to  be on the same page as the faulting instruc-
     tion or memory reference.





SunOS 5.11           Last change: 5 Feb 2008                    4



OpenSolaris man pages main menu

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