xref: /csrg-svn/lib/libc/gen/psignal.3 (revision 48352)
1*48352Scael.\" Copyright (c) 1983, 1991 Regents of the University of California.
2*48352Scael.\" All rights reserved.
320570Smckusick.\"
4*48352Scael.\" %sccs.include.redist.man%
520570Smckusick.\"
6*48352Scael.\"     @(#)psignal.3	6.2 (Berkeley) 04/19/91
7*48352Scael.\"
8*48352Scael.Dd
9*48352Scael.Dt PSIGNAL 3
10*48352Scael.Os BSD 4.2
11*48352Scael.Sh NAME
12*48352Scael.Nm psignal ,
13*48352Scael.Nm sys_siglist
14*48352Scael.Nd system signal messages
15*48352Scael.Sh SYNOPSIS
16*48352Scael.Fd #include <sys/signal.h>
17*48352Scael.Ft void
18*48352Scael.Fn psignal "unsigned sig" "const char *s"
19*48352Scael.Vt extern char *sys_siglist[];
20*48352Scael.Sh DESCRIPTION
21*48352ScaelThe
22*48352Scael.Fn psignal
23*48352Scaelfunction locates the descriptive message
24*48352Scaelstring for the given signal
25*48352Scael.Fa sig
26*48352Scaelnumber
27*48352Scaeland writes it to the
28*48352Scael.Em stderr .
29*48352Scael.Pp
30*48352ScaelIf the argument
31*48352Scael.Fa s
32*48352Scaelis
33*48352Scael.Pf non- Dv NULL
34*48352Scaelit is written to the
35*48352Scael.Em stderr
36*48352Scaelprior to the message string.
37*48352ScaelThe signal number should be from among those found in
38*48352Scael.Aq Pa signal.h .
39*48352Scael.Pp
40*48352ScaelThe message strings can be accessed directly
41*48352Scaelusing the external character array
42*48352Scael.Va sys_siglist .
43*48352ScaelThe defined variable
44*48352Scael.Dv NSIG
45*48352Scaelcontains a count of the messages in
46*48352Scael.Va sys_siglist .
47*48352Scael.Sh SEE ALSO
48*48352Scael.Xr sigaction 2 ,
49*48352Scael.Xr perror 3
50*48352Scael.Sh HISTORY
51*48352ScaelThe
52*48352Scael.Fn psignal
53*48352Scaelfunction appeared in
54*48352Scael.Bx 4.2 .
55