[BACK]Return to siginfo.2 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man2

Annotation of src/share/man/man2/siginfo.2, Revision 1.5

1.5     ! christos    1: .\"    $NetBSD: siginfo.2,v 1.4 2008/04/30 13:10:53 martin Exp $
1.1       wiz         2: .\"
                      3: .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
                      4: .\" All rights reserved.
                      5: .\"
                      6: .\" This code is derived from software contributed to The NetBSD Foundation
                      7: .\" by Christos Zoulas.
                      8: .\"
                      9: .\" Redistribution and use in source and binary forms, with or without
                     10: .\" modification, are permitted provided that the following conditions
                     11: .\" are met:
                     12: .\" 1. Redistributions of source code must retain the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer.
                     14: .\" 2. Redistributions in binary form must reproduce the above copyright
                     15: .\"    notice, this list of conditions and the following disclaimer in the
                     16: .\"    documentation and/or other materials provided with the distribution.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     19: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     20: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     21: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     22: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     23: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     24: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     25: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     26: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     27: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     28: .\" POSSIBILITY OF SUCH DAMAGE.
                     29: .\"
1.5     ! christos   30: .Dd July 26, 2010
1.1       wiz        31: .Dt SIGINFO 2
                     32: .Os
                     33: .Sh NAME
1.2       pooka      34: .Nm siginfo
1.1       wiz        35: .Nd signal information
                     36: .Sh SYNOPSIS
                     37: .In signal.h
                     38: .Sh DESCRIPTION
                     39: .Nm
                     40: is a structure type which contains information about a signal delivered
                     41: to a process.
                     42: .Pp
                     43: .Nm
                     44: includes the following members:
                     45: .Bd -literal -offset indent
                     46: int si_signo;
                     47: int si_errno;
                     48: int si_code;
                     49: .Ed
                     50: .Pp
                     51: .Fa si_signo
                     52: contains the signal number generated by the system.
                     53: .Pp
                     54: If
                     55: .Fa si_errno
                     56: is non-zero, then it contains a system specific error number associated
                     57: with this signal.
                     58: This number is defined in
                     59: .Xr errno 2 .
                     60: .Pp
                     61: If
                     62: .Fa si_code
                     63: is less than or equal to zero, the signal was generated by a user process
                     64: or a user requested service:
                     65: .Bl -tag -width SI_ASYNCIO
                     66: .It SI_USER
                     67: The signal was generated via
                     68: .Xr kill 2 .
                     69: The
                     70: .Nm
                     71: structure contains the following additional members:
                     72: .Bd -literal -offset indent
                     73: pid_t si_pid;
                     74: uid_t si_uid;
                     75: .Ed
                     76: .Pp
                     77: The
                     78: .Fa si_pid
                     79: field contains the pid of the sending process and the
                     80: .Fa si_uid
                     81: field contains the user id of the sending process.
                     82: .\" .It SI_QUEUE
                     83: .\" The signal was generated via
                     84: .\" .Xr sigqueue 3 .
                     85: .\" The
                     86: .\" .Nm
                     87: .\" structure contains the following additional members:
                     88: .\" .Bd -literal -offset indent
                     89: .\" pid_t si_pid;
                     90: .\" uid_t si_uid;
1.3       christos   91: .\" sigval_t si_value;
1.1       wiz        92: .\" .Ed
                     93: .\" .Pp
                     94: .\" The
                     95: .\" .Fa si_pid
                     96: .\" field contains the pid of the sending process and the
                     97: .\" .Fa si_uid
                     98: .\" field contains the user id of the sending process.
                     99: .\" Finally, the
1.3       christos  100: .\" .Fa si_value
1.1       wiz       101: .\" field contains the value sent via
                    102: .\" .Xr sigqueue 3 .
                    103: .It SI_TIMER
                    104: The signal was generated because a timer set by
                    105: .Xr timer_settime 2
                    106: has expired.
                    107: The
                    108: .Nm
                    109: structure contains the following additional members:
                    110: .Bd -literal -offset indent
1.3       christos  111: sigval_t si_value;
1.1       wiz       112: .Ed
                    113: .Pp
                    114: The
1.3       christos  115: .Fa si_value
1.1       wiz       116: field contains the value set via
                    117: .Xr timer_create 2 .
                    118: .It SI_ASYNCIO
                    119: The signal was generated by completion of an asynchronous I/O operation.
                    120: The
                    121: .Nm
                    122: structure contains the following additional members:
                    123: .Bd -literal -offset indent
                    124: int si_fd;
                    125: long si_band;
                    126: .Ed
                    127: .Pp
                    128: The
                    129: .Fa si_fd
                    130: argument contains the file descriptor number on which the operation was
                    131: completed and the
                    132: .Fa si_band
                    133: field contains the side and priority of the operation.
                    134: If the operation was a normal read,
                    135: .Fa si_band
                    136: will contain
                    137: .Dv POLLIN | POLLRDNORM ;
                    138: on an out-of-band read it will contain
                    139: .Dv POLLPRI | POLLRDBAND ;
                    140: on a normal write it will contain
                    141: .Dv POLLOUT | POLLWRNORM ;
                    142: on an out-of-band write it will contain
                    143: .Dv POLLPRI | POLLWRBAND .
                    144: .\" .It SI_MESGQ
                    145: .\" The signal was generated because of the arrival of a message on an empty
                    146: .\" message queue.
                    147: .\" See
                    148: .\" .Xr mq_notify 3 .
                    149: .El
                    150: .Pp
                    151: If
                    152: .Fa si_code
                    153: is positive, then it contains a signal specific reason
                    154: why the signal was generated:
                    155: .Bl -tag -width SIGCHLD
                    156: .It SIGILL
                    157: .Bl -tag -width ILL_ILLOPC
                    158: .It ILL_ILLOPC
                    159: Illegal opcode
                    160: .It ILL_ILLOPN
                    161: Illegal operand
                    162: .It ILL_ILLADR
                    163: Illegal addressing mode
                    164: .It ILL_ILLTRP
                    165: Illegal trap
                    166: .It ILL_PRVOPC
                    167: Privileged opcode
                    168: .It ILL_PRVREG
                    169: Privileged register
                    170: .It ILL_COPROC
                    171: Coprocessor error
                    172: .It ILL_BADSTK
                    173: Internal stack error
                    174: .El
                    175: .It SIGFPE
                    176: .Bl -tag -width FPE_INTDIV
                    177: .It FPE_INTDIV
                    178: Integer divide by zero
                    179: .It FPE_INTOVF
                    180: Integer overflow
                    181: .It FPE_FLTDIV
                    182: Floating point divide by zero
                    183: .It FPE_FLTOVF
                    184: Floating point overflow
                    185: .It FPE_FLTUND
                    186: Floating point underflow
                    187: .It FPE_FLTRES
1.5     ! christos  188: Floating point inexact result
1.1       wiz       189: .It FPE_FLTINV
1.5     ! christos  190: Invalid Floating point operation
1.1       wiz       191: .It FPE_FLTSUB
                    192: Subscript out of range
                    193: .El
                    194: .It SIGSEGV
                    195: .Bl -tag -width SEGV_MAPERR
                    196: .It SEGV_MAPERR
                    197: Address not mapped to object
                    198: .It SEGV_ACCERR
                    199: Invalid permissions for mapped object
                    200: .El
                    201: .It SIGBUS
                    202: .Bl -tag -width BUS_ADRALN
                    203: .It BUS_ADRALN
                    204: Invalid address alignment
                    205: .It BUS_ADRERR
                    206: Non-existant physical address
                    207: .It BUS_OBJERR
                    208: Object specific hardware error
                    209: .El
                    210: .It SIGTRAP
                    211: .Bl -tag -width TRAP_BRKPT
                    212: .It TRAP_BRKPT
                    213: Process breakpoint
                    214: .It TRAP_TRACE
                    215: Process trace trap
                    216: .El
                    217: .It SIGCHLD
                    218: .Bl -tag -width CLD_CONTINUED
                    219: .It CLD_EXITED
                    220: Child has exited
                    221: .It CLD_KILLED
                    222: Child has terminated abnormally but did not create a core file
                    223: .It CLD_DUMPED
                    224: Child has terminated abnormally and created a core file
                    225: .It CLD_TRAPPED
                    226: Traced child has trapped
                    227: .It CLD_STOPPED
                    228: Child has stopped
                    229: .It CLD_CONTINUED
                    230: Stopped child has continued
                    231: .El
                    232: .It SIGPOLL
                    233: .Bl -tag -width POLL_OUT
                    234: .It POLL_IN
                    235: Data input available
                    236: .It POLL_OUT
                    237: Output buffers available
                    238: .It POLL_MSG
                    239: Input message available
                    240: .It POLL_ERR
                    241: I/O Error
                    242: .It POLL_PRI
                    243: High priority input available
                    244: .It POLL_HUP
                    245: Device disconnected
                    246: .El
                    247: .El
                    248: .Pp
                    249: For
                    250: .Dv SIGILL , SIGFPE ,
                    251: and
                    252: .Dv SIGTRAP
                    253: the
                    254: .Nm
                    255: structure contains the following additional members:
                    256: .Bd -literal -offset indent
                    257: void *si_addr;
                    258: int si_trap;
                    259: .Ed
                    260: .Pp
                    261: .Fa si_addr
                    262: contains the address of the faulting instruction and
                    263: .Fa si_trap
                    264: contains a hardware specific reason.
                    265: .Pp
                    266: For
                    267: .Dv SIGBUS
                    268: and
                    269: .Dv SIGSEGV
                    270: the
                    271: .Nm
                    272: structure contains the following additional members:
                    273: .Bd -literal -offset indent
                    274: void *si_addr;
                    275: int si_trap;
                    276: .Ed
                    277: .Pp
                    278: .Fa si_addr
                    279: contains the address of the faulting data and
                    280: .Fa si_trap
                    281: contains a hardware specific reason.
                    282: .Pp
                    283: For
                    284: .Dv SIGPOLL
                    285: the
                    286: .Nm
                    287: structure contains the following additional members:
                    288: .Bd -literal -offset indent
                    289: int si_fd;
                    290: long si_band;
                    291: .Ed
                    292: .Pp
                    293: The
                    294: .Fa si_fd
                    295: argument contains the file descriptor number on which the operation was
                    296: completed and the
                    297: .Fa si_band
                    298: field contains the side and priority of the operation as described above.
                    299: .Pp
                    300: Finally, for
                    301: .Dv SIGCHLD
                    302: the
                    303: .Nm
                    304: structure contains the following additional members:
                    305: .Bd -literal -offset indent
                    306: pid_t si_pid;
                    307: uid_t si_uid;
                    308: int si_status;
                    309: clock_t        si_utime;
                    310: clock_t        si_stime;
                    311: .Ed
                    312: .Pp
                    313: The
                    314: .Fa si_pid
                    315: field contains the pid of the process who's status changed, the
                    316: .Fa si_uid
                    317: field contains the user id of the that process, the
                    318: .Fa si_status
                    319: field contains a status code described in
                    320: .Xr waitpid 2 ,
                    321: and the
                    322: .Fa si_utime
                    323: and
                    324: .Fa si_stime
                    325: fields contain the user and system process accounting time.
                    326: .Sh STANDARDS
                    327: The
                    328: .Nm
                    329: type conforms to
                    330: .St -xsh5 .
                    331: .Sh HISTORY
                    332: The
                    333: .Nm
                    334: functionality first appeared in
                    335: .At V.4 .

CVSweb <webmaster@jp.NetBSD.org>