1da2e3ebdSchin /***********************************************************************
2da2e3ebdSchin *                                                                      *
3da2e3ebdSchin *               This software is part of the ast package               *
4*b30d1939SAndy Fiddaman *          Copyright (c) 1982-2012 AT&T Intellectual Property          *
5da2e3ebdSchin *                      and is licensed under the                       *
6*b30d1939SAndy Fiddaman *                 Eclipse Public License, Version 1.0                  *
77c2fbfb3SApril Chin *                    by AT&T Intellectual Property                     *
8da2e3ebdSchin *                                                                      *
9da2e3ebdSchin *                A copy of the License is available at                 *
10*b30d1939SAndy Fiddaman *          http://www.eclipse.org/org/documents/epl-v10.html           *
11*b30d1939SAndy Fiddaman *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
12da2e3ebdSchin *                                                                      *
13da2e3ebdSchin *              Information and Software Systems Research               *
14da2e3ebdSchin *                            AT&T Research                             *
15da2e3ebdSchin *                           Florham Park NJ                            *
16da2e3ebdSchin *                                                                      *
17da2e3ebdSchin *                  David Korn <dgk@research.att.com>                   *
18da2e3ebdSchin *                                                                      *
19da2e3ebdSchin ***********************************************************************/
20*b30d1939SAndy Fiddaman #include	"defs.h"
21da2e3ebdSchin 
22da2e3ebdSchin #if defined(SIGCLD) && !defined(SIGCHLD)
23da2e3ebdSchin #   define SIGCHLD	SIGCLD
24da2e3ebdSchin #endif
25da2e3ebdSchin 
267c2fbfb3SApril Chin #define VAL(sig,mode)	((sig+1)|((mode)<<SH_SIGBITS))
27da2e3ebdSchin #define TRAP(n)		(((n)|SH_TRAP)-1)
28da2e3ebdSchin 
29da2e3ebdSchin #ifndef ERROR_dictionary
30da2e3ebdSchin #   define  ERROR_dictionary(s)	(s)
31da2e3ebdSchin #endif
32da2e3ebdSchin #define S(s)		ERROR_dictionary(s)
33da2e3ebdSchin 
34da2e3ebdSchin /*
3534f9b3eeSRoland Mainz  * This is a table that gives numbers and default settings to each signal.
3634f9b3eeSRoland Mainz  * The signal numbers go in the low bits and the attributes go in the high bits.
3734f9b3eeSRoland Mainz  * The names must be ASCII sorted lo-hi.
38da2e3ebdSchin  */
39da2e3ebdSchin 
40da2e3ebdSchin const struct shtable2 shtab_signals[] =
41da2e3ebdSchin {
42da2e3ebdSchin #ifdef SIGABRT
4334f9b3eeSRoland Mainz 	"ABRT",		VAL(SIGABRT,SH_SIGDONE), 			S("Abort"),
44da2e3ebdSchin #endif /*SIGABRT */
45da2e3ebdSchin #ifdef SIGAIO
4634f9b3eeSRoland Mainz 	"AIO",		VAL(SIGAIO,SH_SIGIGNORE), 			S("Asynchronous I/O"),
47da2e3ebdSchin #endif /*SIGAIO */
48da2e3ebdSchin #ifdef SIGALRM
4934f9b3eeSRoland Mainz 	"ALRM",		VAL(SIGALRM,SH_SIGDONE),			S("Alarm call"),
5034f9b3eeSRoland Mainz #endif /* SIGALRM */
5134f9b3eeSRoland Mainz #ifdef SIGALRM1
5234f9b3eeSRoland Mainz 	"ALRM1",	VAL(SIGALRM1,SH_SIGDONE),			S("Scheduling - reserved"),
53da2e3ebdSchin #endif /* SIGALRM */
54da2e3ebdSchin #ifdef SIGAPOLLO
5534f9b3eeSRoland Mainz 	"APOLLO",	VAL(SIGAPOLLO,0),				S("SIGAPOLLO"),
56da2e3ebdSchin #endif /* SIGAPOLLO */
57da2e3ebdSchin #ifdef SIGBUS
5834f9b3eeSRoland Mainz 	"BUS",		VAL(SIGBUS,SH_SIGDONE),				S("Bus error"),
59da2e3ebdSchin #endif /* SIGBUS */
607c2fbfb3SApril Chin #ifdef SIGCANCEL
6134f9b3eeSRoland Mainz 	"CANCEL",	VAL(SIGCANCEL,SH_SIGIGNORE), 			S("Thread cancellation"),
627c2fbfb3SApril Chin #endif /*SIGCANCEL */
63da2e3ebdSchin #ifdef SIGCHLD
6434f9b3eeSRoland Mainz 	"CHLD",		VAL(SIGCHLD,SH_SIGFAULT), 			S("Death of Child"),
65da2e3ebdSchin #   ifdef SIGCLD
66da2e3ebdSchin #	if SIGCLD!=SIGCHLD
6734f9b3eeSRoland Mainz 	    "CLD",	VAL(SIGCLD,SH_SIGFAULT),			S("Death of Child"),
68da2e3ebdSchin #	endif
69da2e3ebdSchin #   endif	/* SIGCLD */
70da2e3ebdSchin #else
71da2e3ebdSchin #   ifdef SIGCLD
7234f9b3eeSRoland Mainz 	"CLD",		VAL(SIGCLD,SH_SIGFAULT),			S("Death of Child"),
73da2e3ebdSchin #   endif	/* SIGCLD */
74da2e3ebdSchin #endif	/* SIGCHLD */
75da2e3ebdSchin #ifdef SIGCONT
7634f9b3eeSRoland Mainz 	"CONT",		VAL(SIGCONT,SH_SIGIGNORE),			S("Stopped process continued"),
77da2e3ebdSchin #endif	/* SIGCONT */
7834f9b3eeSRoland Mainz #ifdef SIGCPUFAIL
7934f9b3eeSRoland Mainz 	"CPUFAIL",	VAL(SIGCPUFAIL,0),				S("Predictive processor deconfiguration"),
8034f9b3eeSRoland Mainz #endif	/* SIGRETRACT */
8134f9b3eeSRoland Mainz 	"DEBUG",	VAL(TRAP(SH_DEBUGTRAP),0),			"",
827c2fbfb3SApril Chin #ifdef SIGDANGER
8334f9b3eeSRoland Mainz 	"DANGER",	VAL(SIGDANGER,0),				S("System crash soon"),
847c2fbfb3SApril Chin #endif	/* SIGDANGER */
85da2e3ebdSchin #ifdef SIGDIL
8634f9b3eeSRoland Mainz 	"DIL",		VAL(SIGDIL,0),					S("DIL signal"),
87da2e3ebdSchin #endif	/* SIGDIL */
88da2e3ebdSchin #ifdef SIGEMT
8934f9b3eeSRoland Mainz 	"EMT",		VAL(SIGEMT,SH_SIGDONE),				S("EMT trap"),
90da2e3ebdSchin #endif	/* SIGEMT */
9134f9b3eeSRoland Mainz 	"ERR",		VAL(TRAP(SH_ERRTRAP),0),			"",
92da2e3ebdSchin #ifdef SIGERR
9334f9b3eeSRoland Mainz 	"ERR",		VAL(SIGERR,0),					"",
94da2e3ebdSchin #endif /* SIGERR */
9534f9b3eeSRoland Mainz 	"EXIT",		VAL(0,0),					"",
9634f9b3eeSRoland Mainz 	"FPE",		VAL(SIGFPE,SH_SIGDONE),				S("Floating exception"),
97da2e3ebdSchin #ifdef SIGFREEZE
9834f9b3eeSRoland Mainz 	"FREEZE",	VAL(SIGFREEZE,SH_SIGIGNORE),			S("Special signal used by CPR"),
99da2e3ebdSchin #endif	/* SIGFREEZE */
10034f9b3eeSRoland Mainz #ifdef SIGGRANT
10134f9b3eeSRoland Mainz 	"GRANT",	VAL(SIGGRANT,0),				S("Grant monitor mode"),
10234f9b3eeSRoland Mainz #endif /* SIGGRANT */
10334f9b3eeSRoland Mainz 	"HUP",		VAL(SIGHUP,SH_SIGDONE),				S("Hangup"),
10434f9b3eeSRoland Mainz 	"ILL",		VAL(SIGILL,SH_SIGDONE),				S("Illegal instruction"),
10519d32b9aSRobert Mustacchi #ifdef SIGINFO
106*b30d1939SAndy Fiddaman 	"INFO",         VAL(SIGINFO,SH_SIGIGNORE),                      S("Information request"),
10719d32b9aSRobert Mustacchi #endif /*SIGINFO */
108da2e3ebdSchin #ifdef JOBS
10934f9b3eeSRoland Mainz 	"INT",		VAL(SIGINT,SH_SIGINTERACTIVE),			S("Interrupt"),
110da2e3ebdSchin #else
11134f9b3eeSRoland Mainz 	"INT",		VAL(SIGINT,SH_SIGINTERACTIVE),			"",
112da2e3ebdSchin #endif /* JOBS */
113da2e3ebdSchin #ifdef SIGIO
11434f9b3eeSRoland Mainz 	"IO",		VAL(SIGIO,SH_SIGDONE),				S("IO signal"),
115da2e3ebdSchin #endif	/* SIGIO */
116da2e3ebdSchin #ifdef SIGIOT
11734f9b3eeSRoland Mainz 	"IOT",		VAL(SIGIOT,SH_SIGDONE),				S("Abort"),
118da2e3ebdSchin #endif	/* SIGIOT */
1197c2fbfb3SApril Chin #ifdef SIGJVM1
12034f9b3eeSRoland Mainz 	"JVM1",		VAL(SIGJVM1,SH_SIGIGNORE), 			S("Special signal used by Java Virtual Machine"),
1217c2fbfb3SApril Chin #endif /*SIGJVM1 */
1227c2fbfb3SApril Chin #ifdef SIGJVM2
12334f9b3eeSRoland Mainz 	"JVM2",		VAL(SIGJVM2,SH_SIGIGNORE), 			S("Special signal used by Java Virtual Machine"),
1247c2fbfb3SApril Chin #endif /*SIGJVM2 */
12534f9b3eeSRoland Mainz 	"KEYBD",	VAL(TRAP(SH_KEYTRAP),0),			"",
126da2e3ebdSchin #ifdef SIGKILL
12734f9b3eeSRoland Mainz 	"KILL",		VAL(SIGKILL,0),					S("Killed"),
128da2e3ebdSchin #endif /* SIGKILL */
129da2e3ebdSchin #ifdef SIGLAB
13034f9b3eeSRoland Mainz 	"LAB",		VAL(SIGLAB,0),					S("Security label changed"),
131da2e3ebdSchin #endif	/* SIGLAB */
132da2e3ebdSchin #ifdef SIGLOST
13334f9b3eeSRoland Mainz 	"LOST",		VAL(SIGLOST,SH_SIGDONE),			S("Resources lost"),
134da2e3ebdSchin #endif	/* SIGLOST */
135da2e3ebdSchin #ifdef SIGLWP
13634f9b3eeSRoland Mainz 	"LWP",		VAL(SIGLWP,SH_SIGIGNORE),			S("Special signal used by thread library"),
137da2e3ebdSchin #endif	/* SIGLWP */
13834f9b3eeSRoland Mainz #ifdef SIGMIGRATE
13934f9b3eeSRoland Mainz 	"MIGRATE",	VAL(SIGMIGRATE,0),				S("Migrate process"),
14034f9b3eeSRoland Mainz #endif	/* SIGMIGRATE */
14134f9b3eeSRoland Mainz #ifdef SIGMSG
14234f9b3eeSRoland Mainz 	"MSG",		VAL(SIGMSG,0),					S("Ring buffer input data"),
14334f9b3eeSRoland Mainz #endif	/* SIGMSG */
144da2e3ebdSchin #ifdef SIGPHONE
14534f9b3eeSRoland Mainz 	"PHONE",	VAL(SIGPHONE,0),				S("Phone interrupt"),
146da2e3ebdSchin #endif	/* SIGPHONE */
147da2e3ebdSchin #ifdef SIGPIPE
148da2e3ebdSchin #ifdef JOBS
14934f9b3eeSRoland Mainz 	"PIPE",		VAL(SIGPIPE,SH_SIGDONE),			S("Broken Pipe"),
150da2e3ebdSchin #else
15134f9b3eeSRoland Mainz 	"PIPE",		VAL(SIGPIPE,SH_SIGDONE),	 		"",
152da2e3ebdSchin #endif /* JOBS */
153da2e3ebdSchin #endif /* SIGPIPE */
154da2e3ebdSchin #ifdef SIGPOLL
15534f9b3eeSRoland Mainz 	"POLL",		VAL(SIGPOLL,SH_SIGDONE),			S("Polling alarm"),
156da2e3ebdSchin #endif	/* SIGPOLL */
157da2e3ebdSchin #ifdef SIGPROF
15834f9b3eeSRoland Mainz 	"PROF",		VAL(SIGPROF,SH_SIGDONE), 			S("Profiling time alarm"),
159da2e3ebdSchin #endif	/* SIGPROF */
16034f9b3eeSRoland Mainz #ifdef SIGPRE
16134f9b3eeSRoland Mainz 	"PRE",		VAL(SIGPRE,SH_SIGDONE), 			S("Programming exception"),
16234f9b3eeSRoland Mainz #endif	/* SIGPRE */
163da2e3ebdSchin #ifdef SIGPWR
164da2e3ebdSchin #   if SIGPWR>0
16534f9b3eeSRoland Mainz 	"PWR",		VAL(SIGPWR,SH_SIGIGNORE),			S("Power fail"),
166da2e3ebdSchin #   endif
167da2e3ebdSchin #endif	/* SIGPWR */
168da2e3ebdSchin #ifdef SIGQUIT
169da2e3ebdSchin 	"QUIT",		VAL(SIGQUIT,SH_SIGDONE|SH_SIGINTERACTIVE),	S("Quit"),
1707c2fbfb3SApril Chin #endif	/* SIGQUIT */
17134f9b3eeSRoland Mainz #ifdef SIGRETRACT
17234f9b3eeSRoland Mainz 	"RETRACT",	VAL(SIGRETRACT,0),				S("Relinquish monitor mode"),
17334f9b3eeSRoland Mainz #endif	/* SIGRETRACT */
174da2e3ebdSchin #ifdef SIGRTMIN
17534f9b3eeSRoland Mainz 	"RTMIN",	VAL(SH_SIGRTMIN,SH_SIGRUNTIME),			S("Lowest priority realtime signal"),
176da2e3ebdSchin #endif	/* SIGRTMIN */
177da2e3ebdSchin #ifdef SIGRTMAX
17834f9b3eeSRoland Mainz 	"RTMAX",	VAL(SH_SIGRTMAX,SH_SIGRUNTIME),			S("Highest priority realtime signal"),
179da2e3ebdSchin #endif	/* SIGRTMAX */
18034f9b3eeSRoland Mainz #ifdef SIGSAK
18134f9b3eeSRoland Mainz 	"SAK",		VAL(SIGSAK,0),					S("Secure attention key"),
18234f9b3eeSRoland Mainz #endif	/* SIGSAK */
18334f9b3eeSRoland Mainz 	"SEGV",		VAL(SIGSEGV,0),					S("Memory fault"),
18434f9b3eeSRoland Mainz #ifdef SIGSOUND
18534f9b3eeSRoland Mainz 	"SOUND",	VAL(SIGSOUND,0),				S("Sound completed"),
18634f9b3eeSRoland Mainz #endif	/* SIGSOUND */
187da2e3ebdSchin #ifdef SIGSTOP
18834f9b3eeSRoland Mainz 	"STOP",		VAL(SIGSTOP,0),					S("Stopped (SIGSTOP)"),
189da2e3ebdSchin #endif	/* SIGSTOP */
190da2e3ebdSchin #ifdef SIGSYS
19134f9b3eeSRoland Mainz 	"SYS",		VAL(SIGSYS,SH_SIGDONE),				S("Bad system call"),
192da2e3ebdSchin #endif	/* SIGSYS */
193*b30d1939SAndy Fiddaman #ifdef SIGSTKFLT
194*b30d1939SAndy Fiddaman 	"STKFLT",	VAL(SIGSTKFLT,SH_SIGDONE),			S("Stack Fault"),
195*b30d1939SAndy Fiddaman #endif /* SIGSTKFLT */
196da2e3ebdSchin 	"TERM",		VAL(SIGTERM,SH_SIGDONE|SH_SIGINTERACTIVE),	S("Terminated"),
19734f9b3eeSRoland Mainz #ifdef SIGTHAW
19834f9b3eeSRoland Mainz 	"THAW",		VAL(SIGTHAW,SH_SIGIGNORE),			S("Special signal used by CPR"),
19934f9b3eeSRoland Mainz #endif	/* SIGTHAW */
200da2e3ebdSchin #ifdef SIGTINT
201da2e3ebdSchin #   ifdef JOBS
20234f9b3eeSRoland Mainz 	"TINT",		VAL(SIGTINT,0),					S("Interrupt"),
203da2e3ebdSchin #   else
20434f9b3eeSRoland Mainz 	"TINT",		VAL(SIGTINT,0),					"",
205da2e3ebdSchin #   endif /* JOBS */
206da2e3ebdSchin #endif	/* SIGTINT */
207da2e3ebdSchin #ifdef SIGTRAP
20834f9b3eeSRoland Mainz 	"TRAP",		VAL(SIGTRAP,SH_SIGDONE),			S("Trace/BPT trap"),
209da2e3ebdSchin #endif	/* SIGTRAP */
210da2e3ebdSchin #ifdef SIGTSTP
21134f9b3eeSRoland Mainz 	"TSTP",		VAL(SIGTSTP,0),					S("Stopped"),
212da2e3ebdSchin #endif	/* SIGTSTP */
213da2e3ebdSchin #ifdef SIGTTIN
21434f9b3eeSRoland Mainz 	"TTIN",		VAL(SIGTTIN,0),					S("Stopped (SIGTTIN)"),
215da2e3ebdSchin #endif	/* SIGTTIN */
216da2e3ebdSchin #ifdef SIGTTOU
217*b30d1939SAndy Fiddaman 	"TTOU",		VAL(SIGTTOU,0),					S("Stopped (SIGTTOU)"),
218da2e3ebdSchin #endif	/* SIGTTOU */
219da2e3ebdSchin #ifdef SIGURG
22034f9b3eeSRoland Mainz 	"URG",		VAL(SIGURG,SH_SIGIGNORE),			S("Socket interrupt"),
221da2e3ebdSchin #endif	/* SIGURG */
222da2e3ebdSchin #ifdef SIGUSR1
22334f9b3eeSRoland Mainz 	"USR1",		VAL(SIGUSR1,SH_SIGDONE),			S("User signal 1"),
224da2e3ebdSchin #endif	/* SIGUSR1 */
225da2e3ebdSchin #ifdef SIGUSR2
22634f9b3eeSRoland Mainz 	"USR2",		VAL(SIGUSR2,SH_SIGDONE),	 		S("User signal 2"),
227da2e3ebdSchin #endif	/* SIGUSR2 */
22834f9b3eeSRoland Mainz #ifdef SIGVIRT
22934f9b3eeSRoland Mainz 	"VIRT",		VAL(SIGVIRT,0),					S("Virtual timer alarm"),
23034f9b3eeSRoland Mainz #endif	/* SIGVIRT */
231da2e3ebdSchin #ifdef SIGVTALRM
23234f9b3eeSRoland Mainz 	"VTALRM",	VAL(SIGVTALRM,SH_SIGDONE),			S("Virtual time alarm"),
233da2e3ebdSchin #endif	/* SIGVTALRM */
234da2e3ebdSchin #ifdef SIGWAITING
23534f9b3eeSRoland Mainz 	"WAITING",	VAL(SIGWAITING,SH_SIGIGNORE),			S("All threads blocked"),
236da2e3ebdSchin #endif	/* SIGWAITING */
23734f9b3eeSRoland Mainz #ifdef SIGWINCH
23834f9b3eeSRoland Mainz 	"WINCH",	VAL(SIGWINCH,SH_SIGIGNORE),			S("Window size change"),
23934f9b3eeSRoland Mainz #endif	/* SIGWINCH */
240da2e3ebdSchin #ifdef SIGXCPU
241da2e3ebdSchin 	"XCPU",		VAL(SIGXCPU,SH_SIGDONE|SH_SIGINTERACTIVE),	S("Exceeded CPU time limit"),
242da2e3ebdSchin #endif	/* SIGXCPU */
243da2e3ebdSchin #ifdef SIGXFSZ
244da2e3ebdSchin 	"XFSZ",		VAL(SIGXFSZ,SH_SIGDONE|SH_SIGINTERACTIVE),	S("Exceeded file size limit"),
245da2e3ebdSchin #endif	/* SIGXFSZ */
2467c2fbfb3SApril Chin #ifdef SIGXRES
2477c2fbfb3SApril Chin 	"XRES",		VAL(SIGXRES,SH_SIGDONE|SH_SIGINTERACTIVE),	S("Exceeded resource control"),
2487c2fbfb3SApril Chin #endif	/* SIGRES */
249da2e3ebdSchin 	"",	0,	0
250da2e3ebdSchin };
251