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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1982-2008 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* http://www.opensource.org/licenses/cpl1.0.txt *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#include <ast.h>
#include "shtable.h"
#include "fault.h"
#if defined(SIGCLD) && !defined(SIGCHLD)
# define SIGCHLD SIGCLD
#endif
#define VAL(sig,mode) ((sig+1)|((mode)<<SH_SIGBITS))
#define TRAP(n) (((n)|SH_TRAP)-1)
#ifndef ERROR_dictionary
# define ERROR_dictionary(s) (s)
#endif
#define S(s) ERROR_dictionary(s)
/*
* This is a table that gives numbers and default settings to each signal
* The signal numbers go in the low bits and the attributes go in the high bits
*/
const struct shtable2 shtab_signals[] =
{
#ifdef SIGABRT
"ABRT", VAL(SIGABRT,SH_SIGDONE), S("Abort"),
#endif /*SIGABRT */
#ifdef SIGAIO
"AIO", VAL(SIGAIO,SH_SIGIGNORE), S("Asynchronous I/O"),
#endif /*SIGAIO */
#ifdef SIGALRM
"ALRM", VAL(SIGALRM,SH_SIGDONE), S("Alarm call"),
#endif /* SIGALRM */
#ifdef SIGAPOLLO
"APOLLO", VAL(SIGAPOLLO,0), "SIGAPOLLO"),
#endif /* SIGAPOLLO */
#ifdef SIGBUS
"BUS", VAL(SIGBUS,SH_SIGDONE), S("Bus error"),
#endif /* SIGBUS */
#ifdef SIGCANCEL
"CANCEL", VAL(SIGCANCEL,SH_SIGIGNORE), S("Thread cancellation"),
#endif /*SIGCANCEL */
#ifdef SIGCHLD
"CHLD", VAL(SIGCHLD,SH_SIGFAULT), S("Death of Child"),
# ifdef SIGCLD
# if SIGCLD!=SIGCHLD
"CLD", VAL(SIGCLD,SH_SIGFAULT), S("Death of Child"),
# endif
# endif /* SIGCLD */
#else
# ifdef SIGCLD
"CLD", VAL(SIGCLD,SH_SIGFAULT), S("Death of Child"),
# endif /* SIGCLD */
#endif /* SIGCHLD */
#ifdef SIGCONT
"CONT", VAL(SIGCONT,SH_SIGIGNORE), S("Stopped process continued"),
#endif /* SIGCONT */
"DEBUG", VAL(TRAP(SH_DEBUGTRAP),0), "",
#ifdef SIGDANGER
"DANGER", VAL(SIGDANGER,0), S("System crash soon"),
#endif /* SIGDANGER */
#ifdef SIGDIL
"DIL", VAL(SIGDIL,0), S("DIL signal"),
#endif /* SIGDIL */
#ifdef SIGEMT
"EMT", VAL(SIGEMT,SH_SIGDONE), S("EMT trap"),
#endif /* SIGEMT */
"ERR", VAL(TRAP(SH_ERRTRAP),0), "",
#ifdef SIGERR
"ERR", VAL(SIGERR,0), "",
#endif /* SIGERR */
"EXIT", VAL(0,0), "",
"FPE", VAL(SIGFPE,SH_SIGDONE), S("Floating exception"),
#ifdef SIGFREEZE
"FREEZE", VAL(SIGFREEZE,SH_SIGIGNORE), S("Special signal used by CPR"),
#endif /* SIGFREEZE */
"HUP", VAL(SIGHUP,SH_SIGDONE), S("Hangup"),
"ILL", VAL(SIGILL,SH_SIGDONE), S("Illegal instruction"),
#ifdef JOBS
"INT", VAL(SIGINT,SH_SIGINTERACTIVE), S("Interrupt"),
#else
"INT", VAL(SIGINT,SH_SIGINTERACTIVE), "",
#endif /* JOBS */
#ifdef SIGIO
"IO", VAL(SIGIO,SH_SIGIGNORE), S("IO signal"),
#endif /* SIGIO */
#ifdef SIGIOT
"IOT", VAL(SIGIOT,SH_SIGDONE), S("Abort"),
#endif /* SIGIOT */
#ifdef SIGJVM1
"JVM1", VAL(SIGJVM1,SH_SIGIGNORE), S("Special signal used by Java Virtual Machine"),
#endif /*SIGJVM1 */
#ifdef SIGJVM2
"JVM2", VAL(SIGJVM2,SH_SIGIGNORE), S("Special signal used by Java Virtual Machine"),
#endif /*SIGJVM2 */
"KEYBD", VAL(TRAP(SH_KEYTRAP),0), "",
#ifdef SIGKILL
"KILL", VAL(SIGKILL,0), S("Killed"),
#endif /* SIGKILL */
#ifdef SIGLAB
"LAB", VAL(SIGLAB,0), S("Security label changed"),
#endif /* SIGLAB */
#ifdef SIGLOST
"LOST", VAL(SIGLOST,SH_SIGDONE), S("Resources lost"),
#endif /* SIGLOST */
#ifdef SIGLWP
"LWP", VAL(SIGLWP,SH_SIGIGNORE), S("Special signal used by thread library"),
#endif /* SIGLWP */
#ifdef SIGPHONE
"PHONE", VAL(SIGPHONE,0), S("Phone interrupt"),
#endif /* SIGPHONE */
#ifdef SIGPIPE
#ifdef JOBS
"PIPE", VAL(SIGPIPE,SH_SIGDONE), S("Broken Pipe"),
#else
"PIPE", VAL(SIGPIPE,SH_SIGDONE), "",
#endif /* JOBS */
#endif /* SIGPIPE */
#ifdef SIGPOLL
"POLL", VAL(SIGPOLL,SH_SIGDONE), S("Polling alarm"),
#endif /* SIGPOLL */
#ifdef SIGPROF
"PROF", VAL(SIGPROF,SH_SIGDONE), S("Profiling time alarm"),
#endif /* SIGPROF */
#ifdef SIGPWR
# if SIGPWR>0
"PWR", VAL(SIGPWR,SH_SIGIGNORE), S("Power fail"),
# endif
#endif /* SIGPWR */
#ifdef SIGQUIT
"QUIT", VAL(SIGQUIT,SH_SIGDONE|SH_SIGINTERACTIVE), S("Quit"),
#endif /* SIGQUIT */
#ifdef SIGRTMIN
"RTMIN", VAL(SH_SIGRTMIN,SH_SIGRUNTIME), S("Lowest priority realtime signal"),
#endif /* SIGRTMIN */
#ifdef SIGRTMAX
"RTMAX", VAL(SH_SIGRTMAX,SH_SIGRUNTIME), S("Highest priority realtime signal"),
#endif /* SIGRTMAX */
"SEGV", VAL(SIGSEGV,0), S("Memory fault"),
#ifdef SIGSTOP
"STOP", VAL(SIGSTOP,0), S("Stopped (SIGSTOP)"),
#endif /* SIGSTOP */
#ifdef SIGSYS
"SYS", VAL(SIGSYS,SH_SIGDONE), S("Bad system call"),
#endif /* SIGSYS */
"TERM", VAL(SIGTERM,SH_SIGDONE|SH_SIGINTERACTIVE), S("Terminated"),
#ifdef SIGTINT
# ifdef JOBS
"TINT", VAL(SIGTINT,0), S("Interrupt"),
# else
"TINT", VAL(SIGTINT,0), "".
# endif /* JOBS */
#endif /* SIGTINT */
#ifdef SIGTRAP
"TRAP", VAL(SIGTRAP,SH_SIGDONE), S("Trace/BPT trap"),
#endif /* SIGTRAP */
#ifdef SIGTSTP
"TSTP", VAL(SIGTSTP,0), S("Stopped"),
#endif /* SIGTSTP */
#ifdef SIGTTIN
"TTIN", VAL(SIGTTIN,0), S("Stopped (SIGTTIN)"),
#endif /* SIGTTIN */
#ifdef SIGTTOU
"TTOU", VAL(SIGTTOU,0), S("Stopped(SIGTTOU)"),
#endif /* SIGTTOU */
#ifdef SIGURG
"URG", VAL(SIGURG,SH_SIGIGNORE), S("Socket interrupt"),
#endif /* SIGURG */
#ifdef SIGUSR1
"USR1", VAL(SIGUSR1,SH_SIGDONE), S("User signal 1"),
#endif /* SIGUSR1 */
#ifdef SIGUSR2
"USR2", VAL(SIGUSR2,SH_SIGDONE), S("User signal 2"),
#endif /* SIGUSR2 */
#ifdef SIGVTALRM
"VTALRM", VAL(SIGVTALRM,SH_SIGDONE), S("Virtual time alarm"),
#endif /* SIGVTALRM */
#ifdef SIGWINCH
"WINCH", VAL(SIGWINCH,SH_SIGIGNORE), S("Window size change"),
#endif /* SIGWINCH */
#ifdef SIGMIGRATE
"MIGRATE", VAL(SIGMIGRATE,0), S("Migrate process"),
#endif /* SIGMIGRATE */
#ifdef SIGSOUND
"SOUND", VAL(SIGSOUND,0), S("Sound completed"),
#endif /* SIGSOUND */
#ifdef SIGTHAW
"THAW", VAL(SIGTHAW,SH_SIGIGNORE), S("Special signal used by CPR"),
#endif /* SIGTHAW */
#ifdef SIGWAITING
"WAITING", VAL(SIGWAITING,SH_SIGIGNORE), S("All threads blocked"),
#endif /* SIGWAITING */
#ifdef SIGXCPU
"XCPU", VAL(SIGXCPU,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded CPU time limit"),
#endif /* SIGXCPU */
#ifdef SIGXFSZ
"XFSZ", VAL(SIGXFSZ,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded file size limit"),
#endif /* SIGXFSZ */
#ifdef SIGXRES
"XRES", VAL(SIGXRES,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded resource control"),
#endif /* SIGRES */
"", 0, 0
};
|