siglist.c revision 218285
1219820Sjeff/*
2219820Sjeff * Copyright (c) 1983, 1993
3219820Sjeff *	The Regents of the University of California.  All rights reserved.
4219820Sjeff *
5219820Sjeff * Redistribution and use in source and binary forms, with or without
6219820Sjeff * modification, are permitted provided that the following conditions
7219820Sjeff * are met:
8219820Sjeff * 1. Redistributions of source code must retain the above copyright
9219820Sjeff *    notice, this list of conditions and the following disclaimer.
10219820Sjeff * 2. Redistributions in binary form must reproduce the above copyright
11219820Sjeff *    notice, this list of conditions and the following disclaimer in the
12219820Sjeff *    documentation and/or other materials provided with the distribution.
13219820Sjeff * 4. Neither the name of the University nor the names of its contributors
14219820Sjeff *    may be used to endorse or promote products derived from this software
15219820Sjeff *    without specific prior written permission.
16219820Sjeff *
17219820Sjeff * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18219820Sjeff * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19219820Sjeff * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20219820Sjeff * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21219820Sjeff * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22219820Sjeff * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23219820Sjeff * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24219820Sjeff * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25219820Sjeff * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26219820Sjeff * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27219820Sjeff * SUCH DAMAGE.
28219820Sjeff */
29219820Sjeff
30219820Sjeff#if defined(LIBC_SCCS) && !defined(lint)
31219820Sjeffstatic char sccsid[] = "@(#)siglist.c	8.1 (Berkeley) 6/4/93";
32219820Sjeff#endif /* LIBC_SCCS and not lint */
33219820Sjeff#include <sys/cdefs.h>
34219820Sjeff__FBSDID("$FreeBSD: head/lib/libc/gen/siglist.c 218285 2011-02-04 16:40:50Z jilles $");
35219820Sjeff
36219820Sjeff#include <signal.h>
37219820Sjeff
38219820Sjeffconst char *const sys_signame[NSIG] = {
39219820Sjeff	"Signal 0",
40219820Sjeff	"HUP",				/* SIGHUP */
41219820Sjeff	"INT",				/* SIGINT */
42219820Sjeff	"QUIT",				/* SIGQUIT */
43219820Sjeff	"ILL",				/* SIGILL */
44219820Sjeff	"TRAP",				/* SIGTRAP */
45219820Sjeff	"ABRT",				/* SIGABRT */
46219820Sjeff	"EMT",				/* SIGEMT */
47219820Sjeff	"FPE",				/* SIGFPE */
48	"KILL",				/* SIGKILL */
49	"BUS",				/* SIGBUS */
50	"SEGV",				/* SIGSEGV */
51	"SYS",				/* SIGSYS */
52	"PIPE",				/* SIGPIPE */
53	"ALRM",				/* SIGALRM */
54	"TERM",				/* SIGTERM */
55	"URG",				/* SIGURG */
56	"STOP",				/* SIGSTOP */
57	"TSTP",				/* SIGTSTP */
58	"CONT",				/* SIGCONT */
59	"CHLD",				/* SIGCHLD */
60	"TTIN",				/* SIGTTIN */
61	"TTOU",				/* SIGTTOU */
62	"IO",				/* SIGIO */
63	"XCPU",				/* SIGXCPU */
64	"XFSZ",				/* SIGXFSZ */
65	"VTALRM",			/* SIGVTALRM */
66	"PROF",				/* SIGPROF */
67	"WINCH",			/* SIGWINCH */
68	"INFO",				/* SIGINFO */
69	"USR1",				/* SIGUSR1 */
70	"USR2"				/* SIGUSR2 */
71};
72
73const char *const sys_siglist[NSIG] = {
74	"Signal 0",
75	"Hangup",			/* SIGHUP */
76	"Interrupt",			/* SIGINT */
77	"Quit",				/* SIGQUIT */
78	"Illegal instruction",		/* SIGILL */
79	"Trace/BPT trap",		/* SIGTRAP */
80	"Abort trap",			/* SIGABRT */
81	"EMT trap",			/* SIGEMT */
82	"Floating point exception",	/* SIGFPE */
83	"Killed",			/* SIGKILL */
84	"Bus error",			/* SIGBUS */
85	"Segmentation fault",		/* SIGSEGV */
86	"Bad system call",		/* SIGSYS */
87	"Broken pipe",			/* SIGPIPE */
88	"Alarm clock",			/* SIGALRM */
89	"Terminated",			/* SIGTERM */
90	"Urgent I/O condition",		/* SIGURG */
91	"Suspended (signal)",		/* SIGSTOP */
92	"Suspended",			/* SIGTSTP */
93	"Continued",			/* SIGCONT */
94	"Child exited",			/* SIGCHLD */
95	"Stopped (tty input)",		/* SIGTTIN */
96	"Stopped (tty output)",		/* SIGTTOU */
97	"I/O possible",			/* SIGIO */
98	"Cputime limit exceeded",	/* SIGXCPU */
99	"Filesize limit exceeded",	/* SIGXFSZ */
100	"Virtual timer expired",	/* SIGVTALRM */
101	"Profiling timer expired",	/* SIGPROF */
102	"Window size changes",		/* SIGWINCH */
103	"Information request",		/* SIGINFO */
104	"User defined signal 1",	/* SIGUSR1 */
105	"User defined signal 2"		/* SIGUSR2 */
106};
107const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
108