-
Notifications
You must be signed in to change notification settings - Fork 30
/
siglist.h
178 lines (158 loc) · 3.69 KB
/
siglist.h
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
/* Yash: yet another shell */
/* siglist.h: defines list of signals */
/* (C) 2007-2009 magicant */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef YASH_SIGLIST_H
#define YASH_SIGLIST_H
#include <signal.h>
#include <stddef.h>
/* signal number and name */
typedef struct signal_T {
int no;
const wchar_t *name;
} signal_T;
/* list of signals */
static const signal_T signals[] = {
/* signals defined by SUSv2 & POSIX.1-2001 (SUSv3) */
{ SIGHUP, L"HUP", }, { SIGINT, L"INT", }, { SIGQUIT, L"QUIT", },
{ SIGILL, L"ILL", }, { SIGABRT, L"ABRT", }, { SIGBUS, L"BUS", },
{ SIGFPE, L"FPE", }, { SIGKILL, L"KILL", }, { SIGSEGV, L"SEGV", },
{ SIGPIPE, L"PIPE", }, { SIGALRM, L"ALRM", }, { SIGTERM, L"TERM", },
{ SIGUSR1, L"USR1", }, { SIGUSR2, L"USR2", }, { SIGCHLD, L"CHLD", },
{ SIGCONT, L"CONT", }, { SIGSTOP, L"STOP", }, { SIGTSTP, L"TSTP", },
{ SIGTTIN, L"TTIN", }, { SIGTTOU, L"TTOU", }, { SIGURG, L"URG", },
#ifdef SIGTRAP
{ SIGTRAP, L"TRAP", },
#endif
#ifdef SIGXCPU
{ SIGXCPU, L"XCPU", },
#endif
#ifdef SIGXFSZ
{ SIGXFSZ, L"XFSZ", },
#endif
#ifdef SIGVTALRM
{ SIGVTALRM, L"VTALRM", },
#endif
#ifdef SIGPROF
{ SIGPROF, L"PROF", },
#endif
#ifdef SIGPOLL
{ SIGPOLL, L"POLL", },
#endif
#ifdef SIGSYS
{ SIGSYS, L"SYS", },
#endif
/* below are non-standardized signals */
#ifdef SIGIOT
{ SIGIOT, L"IOT", },
#endif
#ifdef SIGEMT
{ SIGEMT, L"EMT", },
#endif
#ifdef SIGSTKFLT
{ SIGSTKFLT, L"STKFLT", },
#endif
#ifdef SIGIO
{ SIGIO, L"IO", },
#endif
#ifdef SIGCLD
{ SIGCLD, L"CLD", },
#endif
#ifdef SIGPWR
{ SIGPWR, L"PWR", },
#endif
#ifdef SIGLOST
{ SIGLOST, L"LOST", },
#endif
#ifdef SIGWINCH
{ SIGWINCH, L"WINCH", },
#endif
#ifdef SIGWINDOW
{ SIGWINDOW, L"WINDOW", },
#endif
/* from BSD */
#ifdef SIGINFO
{ SIGINFO, L"INFO", },
#endif
#ifdef SIGTHR
{ SIGTHR, L"THR", },
#endif
/* from AIX */
#ifdef SIGMSG
{ SIGMSG, L"MSG", },
#endif
#ifdef SIGDANGER
{ SIGDANGER, L"DANGER", },
#endif
#ifdef SIGMIGRATE
{ SIGMIGRATE, L"MIGRATE", },
#endif
#ifdef SIGPRE
{ SIGPRE, L"PRE", },
#endif
#ifdef SIGVIRT
{ SIGVIRT, L"VIRT", },
#endif
#ifdef SIGALRM1
{ SIGALRM1, L"ALRM1", },
#endif
#ifdef SIGWAITING
{ SIGWAITING, L"WAITING", },
#endif
#ifdef SIGKAP
{ SIGKAP, L"KAP", },
#endif
#ifdef SIGGRANT
{ SIGGRANT, L"GRANT", },
#endif
#ifdef SIGRETRACT
{ SIGRETRACT, L"RETRACT", },
#endif
#ifdef SIGSOUND
{ SIGSOUND, L"SOUND", },
#endif
#ifdef SIGSAK
{ SIGSAK, L"SAK", },
#endif
/* from SunOS5 */
#ifdef SIGLWP
{ SIGLWP, L"LWP", },
#endif
#ifdef SIGFREEZE
{ SIGFREEZE, L"FREEZE", },
#endif
#ifdef SIGTHAW
{ SIGTHAW, L"THAW", },
#endif
#ifdef SIGCANCEL
{ SIGCANCEL, L"CANCEL", },
#endif
#ifdef SIGXRES
{ SIGXRES, L"XRES", },
#endif
/* from HP-UX */
#ifdef SIGRESERVE
{ SIGRESERVE, L"RESERVE", },
#endif
#ifdef SIGDIL
{ SIGDIL, L"DIL", },
#endif
#ifdef SIGUNUSED
{ SIGUNUSED, L"UNUSED", },
#endif
/* end of array: any signal number is non-zero (C99 7.14) */
{ 0, NULL, },
};
#endif /* YASH_SIGLIST_H */
/* vim: set ts=8 sts=4 sw=4 et tw=80: */