summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/gen/siglist.c
blob: bc6dc1b7310e44a55871be0acc21bc9f63e94000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 * Copyright 2015, Joyent, Inc.
 */

/*	Copyright (c) 1988 AT&T	*/
/*	  All Rights Reserved  	*/

/*
 * University Copyright- Copyright (c) 1982, 1986, 1988
 * The Regents of the University of California
 * All Rights Reserved
 *
 * University Acknowledgment- Portions of this document are derived from
 * software developed by the University of California, Berkeley, and its
 * contributors.
 */

#include "lint.h"
#include <sys/types.h>
#include <signal.h>

#undef	_sys_nsig
#undef	_sys_siglist
#define	OLDNSIG	34

const int _sys_nsig = OLDNSIG;

static const char	STR_SIG_UNK[]	= "UNKNOWN SIGNAL";
static const char	STR_SIGHUP[]	= "Hangup";
static const char	STR_SIGINT[]	= "Interrupt";
static const char	STR_SIGQUIT[]	= "Quit";
static const char	STR_SIGILL[]	= "Illegal Instruction";
static const char	STR_SIGTRAP[]	= "Trace/Breakpoint Trap";
static const char	STR_SIGABRT[]	= "Abort";
static const char	STR_SIGEMT[]	= "Emulation Trap";
static const char	STR_SIGFPE[]	= "Arithmetic Exception";
static const char	STR_SIGKILL[]	= "Killed";
static const char	STR_SIGBUS[]	= "Bus Error";
static const char	STR_SIGSEGV[]	= "Segmentation Fault";
static const char	STR_SIGSYS[]	= "Bad System Call";
static const char	STR_SIGPIPE[]	= "Broken Pipe";
static const char	STR_SIGALRM[]	= "Alarm Clock";
static const char	STR_SIGTERM[]	= "Terminated";
static const char	STR_SIGUSR1[]	= "User Signal 1";
static const char	STR_SIGUSR2[]	= "User Signal 2";
static const char	STR_SIGCLD[]	= "Child Status Changed";
static const char	STR_SIGPWR[]	= "Power-Fail/Restart";
static const char	STR_SIGWINCH[]	= "Window Size Change";
static const char	STR_SIGURG[]	= "Urgent Socket Condition";
static const char	STR_SIGPOLL[]	= "Pollable Event";
static const char	STR_SIGSTOP[]	= "Stopped (signal)";
static const char	STR_SIGTSTP[]	= "Stopped (user)";
static const char	STR_SIGCONT[]	= "Continued";
static const char	STR_SIGTTIN[]	= "Stopped (tty input)";
static const char	STR_SIGTTOU[]	= "Stopped (tty output)";
static const char	STR_SIGVTALRM[]	= "Virtual Timer Expired";
static const char	STR_SIGPROF[]	= "Profiling Timer Expired";
static const char	STR_SIGXCPU[]	= "Cpu Limit Exceeded";
static const char	STR_SIGXFSZ[]	= "File Size Limit Exceeded";
static const char	STR_SIGWAITING[]	= "No runnable lwp";
static const char	STR_SIGLWP[]	= "Inter-lwp signal";

const char *_sys_siglist[OLDNSIG] = {
	STR_SIG_UNK,	STR_SIGHUP,	STR_SIGINT,	STR_SIGQUIT,
	STR_SIGILL,	STR_SIGTRAP,	STR_SIGABRT,	STR_SIGEMT,
	STR_SIGFPE,	STR_SIGKILL,	STR_SIGBUS,	STR_SIGSEGV,
	STR_SIGSYS,	STR_SIGPIPE,	STR_SIGALRM,	STR_SIGTERM,
	STR_SIGUSR1,	STR_SIGUSR2,	STR_SIGCLD,	STR_SIGPWR,
	STR_SIGWINCH,	STR_SIGURG,	STR_SIGPOLL,	STR_SIGSTOP,
	STR_SIGTSTP,	STR_SIGCONT,	STR_SIGTTIN,	STR_SIGTTOU,
	STR_SIGVTALRM,	STR_SIGPROF,	STR_SIGXCPU,	STR_SIGXFSZ,
	STR_SIGWAITING,	STR_SIGLWP,
};

static const char *_sys_siglist_data[NSIG] = {
	STR_SIG_UNK,	STR_SIGHUP,	STR_SIGINT,	STR_SIGQUIT,
	STR_SIGILL,	STR_SIGTRAP,	STR_SIGABRT,	STR_SIGEMT,
	STR_SIGFPE,	STR_SIGKILL,	STR_SIGBUS,	STR_SIGSEGV,
	STR_SIGSYS,	STR_SIGPIPE,	STR_SIGALRM,	STR_SIGTERM,
	STR_SIGUSR1,	STR_SIGUSR2,	STR_SIGCLD,	STR_SIGPWR,
	STR_SIGWINCH,	STR_SIGURG,	STR_SIGPOLL,	STR_SIGSTOP,
	STR_SIGTSTP,	STR_SIGCONT,	STR_SIGTTIN,	STR_SIGTTOU,
	STR_SIGVTALRM,	STR_SIGPROF,	STR_SIGXCPU,	STR_SIGXFSZ,
	STR_SIGWAITING,	STR_SIGLWP,
		"Checkpoint Freeze",			/* SIGFREEZE	*/
		"Checkpoint Thaw",			/* SIGTHAW	*/
		"Thread Cancellation",			/* SIGCANCEL	*/
		"Resource Lost",			/* SIGLOST	*/
		"Resource Control Exceeded",		/* SIGXRES	*/
		"Reserved for JVM 1",			/* SIGJVM1	*/
		"Reserved for JVM 2",			/* SIGJVM2	*/
		"Information Request",			/* SIGINFO	*/
		"First Realtime Signal",		/* SIGRTMIN	*/
		"Second Realtime Signal",		/* SIGRTMIN+1	*/
		"Third Realtime Signal",		/* SIGRTMIN+2	*/
		"Fourth Realtime Signal",		/* SIGRTMIN+3	*/
		"Fifth Realtime Signal",		/* SIGRTMIN+4	*/
		"Sixth Realtime Signal",		/* SIGRTMIN+5	*/
		"Seventh Realtime Signal",		/* SIGRTMIN+6	*/
		"Eighth Realtime Signal",		/* SIGRTMIN+7	*/
		"Ninth Realtime Signal",		/* SIGRTMIN+8	*/
		"Tenth Realtime Signal",		/* SIGRTMIN+9	*/
		"Eleventh Realtime Signal",		/* SIGRTMIN+10	*/
		"Twelfth Realtime Signal",		/* SIGRTMIN+11	*/
		"Thirteenth Realtime Signal",		/* SIGRTMIN+12	*/
		"Fourteenth Realtime Signal",		/* SIGRTMIN+13	*/
		"Fifteenth Realtime Signal",		/* SIGRTMIN+14	*/
		"Sixteenth Realtime Signal",		/* SIGRTMIN+15	*/
		"Seventeenth Realtime Signal",		/* SIGRTMIN+16	*/
		"Sixteenth Last Realtime Signal",	/* SIGRTMAX-15	*/
		"Fifteenth Last Realtime Signal",	/* SIGRTMAX-14	*/
		"Fourteenth Last Realtime Signal",	/* SIGRTMAX-13	*/
		"Thirteenth Last Realtime Signal",	/* SIGRTMAX-12	*/
		"Twelfth Last Realtime Signal",		/* SIGRTMAX-11	*/
		"Eleventh Last Realtime Signal",	/* SIGRTMAX-10	*/
		"Tenth Last Realtime Signal",		/* SIGRTMAX-9	*/
		"Ninth Last Realtime Signal",		/* SIGRTMAX-8	*/
		"Eighth Last Realtime Signal",		/* SIGRTMAX-7	*/
		"Seventh Last Realtime Signal",		/* SIGRTMAX-6	*/
		"Sixth Last Realtime Signal",		/* SIGRTMAX-5	*/
		"Fifth Last Realtime Signal",		/* SIGRTMAX-4	*/
		"Fourth Last Realtime Signal",		/* SIGRTMAX-3	*/
		"Third Last Realtime Signal",		/* SIGRTMAX-2	*/
		"Second Last Realtime Signal",		/* SIGRTMAX-1	*/
		"Last Realtime Signal"			/* SIGRTMAX	*/
};

const int	_sys_siglistn = sizeof (_sys_siglist_data) / sizeof (char *);
const char	**_sys_siglistp = _sys_siglist_data;