siglist.c revision 165903
11022Sache/*
278858Sjoerg * Copyright (c) 1983, 1993
31022Sache *	The Regents of the University of California.  All rights reserved.
41022Sache *
51022Sache * Redistribution and use in source and binary forms, with or without
61022Sache * modification, are permitted provided that the following conditions
71022Sache * are met:
81022Sache * 1. Redistributions of source code must retain the above copyright
91022Sache *    notice, this list of conditions and the following disclaimer.
101022Sache * 2. Redistributions in binary form must reproduce the above copyright
111022Sache *    notice, this list of conditions and the following disclaimer in the
121022Sache *    documentation and/or other materials provided with the distribution.
131022Sache * 4. Neither the name of the University nor the names of its contributors
141533Sjoerg *    may be used to endorse or promote products derived from this software
151533Sjoerg *    without specific prior written permission.
161533Sjoerg *
171533Sjoerg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181533Sjoerg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191533Sjoerg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201533Sjoerg * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211533Sjoerg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221533Sjoerg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231533Sjoerg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241533Sjoerg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2555541Skato * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2655541Skato * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271022Sache * SUCH DAMAGE.
281022Sache */
291022Sache
301022Sache#if defined(LIBC_SCCS) && !defined(lint)
311022Sachestatic char sccsid[] = "@(#)siglist.c	8.1 (Berkeley) 6/4/93";
328857Srgrimes#endif /* LIBC_SCCS and not lint */
331022Sache#include <sys/cdefs.h>
341022Sache__FBSDID("$FreeBSD: head/lib/libc/gen/siglist.c 165903 2007-01-09 00:28:16Z imp $");
351022Sache
361022Sache#include <sys/cdefs.h>
371022Sache#include <signal.h>
381022Sache
391022Sacheconst char *const sys_signame[NSIG] = {
401022Sache	"Signal 0",
411022Sache	"hup",				/* SIGHUP */
421022Sache	"int",				/* SIGINT */
4329531Scharnier	"quit",				/* SIGQUIT */
4429531Scharnier	"ill",				/* SIGILL */
4579111Sjoerg	"trap",				/* SIGTRAP */
4629531Scharnier	"abrt",				/* SIGABRT */
4769793Sobrien	"emt",				/* SIGEMT */
481022Sache	"fpe",				/* SIGFPE */
491022Sache	"kill",				/* SIGKILL */
5029531Scharnier	"bus",				/* SIGBUS */
511022Sache	"segv",				/* SIGSEGV */
521022Sache	"sys",				/* SIGSYS */
5377801Sjoerg	"pipe",				/* SIGPIPE */
541022Sache	"alrm",				/* SIGALRM */
5579111Sjoerg	"term",				/* SIGTERM */
5679111Sjoerg	"urg",				/* SIGURG */
571022Sache	"stop",				/* SIGSTOP */
581022Sache	"tstp",				/* SIGTSTP */
591137Sache	"cont",				/* SIGCONT */
601022Sache	"chld",				/* SIGCHLD */
611022Sache	"ttin",				/* SIGTTIN */
621137Sache	"ttou",				/* SIGTTOU */
631138Sache	"io",				/* SIGIO */
641022Sache	"xcpu",				/* SIGXCPU */
651137Sache	"xfsz",				/* SIGXFSZ */
661137Sache	"vtalrm",			/* SIGVTALRM */
671137Sache	"prof",				/* SIGPROF */
681137Sache	"winch",			/* SIGWINCH */
691137Sache	"info",				/* SIGINFO */
701137Sache	"usr1",				/* SIGUSR1 */
711137Sache	"usr2"				/* SIGUSR2 */
721022Sache};
731022Sache
741022Sacheconst char *const sys_siglist[NSIG] = {
751022Sache	"Signal 0",
761022Sache	"Hangup",			/* SIGHUP */
771022Sache	"Interrupt",			/* SIGINT */
781022Sache	"Quit",				/* SIGQUIT */
791022Sache	"Illegal instruction",		/* SIGILL */
801022Sache	"Trace/BPT trap",		/* SIGTRAP */
811022Sache	"Abort trap",			/* SIGABRT */
821022Sache	"EMT trap",			/* SIGEMT */
831022Sache	"Floating point exception",	/* SIGFPE */
841137Sache	"Killed",			/* SIGKILL */
851022Sache	"Bus error",			/* SIGBUS */
861022Sache	"Segmentation fault",		/* SIGSEGV */
8729531Scharnier	"Bad system call",		/* SIGSYS */
8829531Scharnier	"Broken pipe",			/* SIGPIPE */
891022Sache	"Alarm clock",			/* SIGALRM */
901022Sache	"Terminated",			/* SIGTERM */
911022Sache	"Urgent I/O condition",		/* SIGURG */
921022Sache	"Suspended (signal)",		/* SIGSTOP */
931022Sache	"Suspended",			/* SIGTSTP */
941022Sache	"Continued",			/* SIGCONT */
951022Sache	"Child exited",			/* SIGCHLD */
961533Sjoerg	"Stopped (tty input)",		/* SIGTTIN */
971022Sache	"Stopped (tty output)",		/* SIGTTOU */
981533Sjoerg	"I/O possible",			/* SIGIO */
9929531Scharnier	"Cputime limit exceeded",	/* SIGXCPU */
1001533Sjoerg	"Filesize limit exceeded",	/* SIGXFSZ */
1011533Sjoerg	"Virtual timer expired",	/* SIGVTALRM */
1021533Sjoerg	"Profiling timer expired",	/* SIGPROF */
1031533Sjoerg	"Window size changes",		/* SIGWINCH */
1041533Sjoerg	"Information request",		/* SIGINFO */
1058857Srgrimes	"User defined signal 1",	/* SIGUSR1 */
1061022Sache	"User defined signal 2"		/* SIGUSR2 */
1071022Sache};
1081022Sacheconst int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
1091022Sache