1#include <linux/signal.h>
2
3#define SIGUNKNOWN 0
4#define MAXMAPPED_SIG 35
5#define MAXMAPPED_SIGNAME (MAXMAPPED_SIG + 1)
6#define SIGRT_BASE 128
7
8
9
10
11
12static const int sig_map[MAXMAPPED_SIG] = {
13 [0] = MAXMAPPED_SIG,
14 [SIGHUP] = 1,
15 [SIGINT] = 2,
16 [SIGQUIT] = 3,
17 [SIGILL] = 4,
18 [SIGTRAP] = 5,
19 [SIGABRT] = 6,
20 [SIGBUS] = 7,
21 [SIGFPE] = 8,
22 [SIGKILL] = 9,
23 [SIGUSR1] = 10,
24 [SIGSEGV] = 11,
25 [SIGUSR2] = 12,
26 [SIGPIPE] = 13,
27 [SIGALRM] = 14,
28 [SIGTERM] = 15,
29#ifdef SIGSTKFLT
30 [SIGSTKFLT] = 16,
31#endif
32 [SIGCHLD] = 17,
33 [SIGCONT] = 18,
34 [SIGSTOP] = 19,
35 [SIGTSTP] = 20,
36 [SIGTTIN] = 21,
37 [SIGTTOU] = 22,
38 [SIGURG] = 23,
39 [SIGXCPU] = 24,
40 [SIGXFSZ] = 25,
41 [SIGVTALRM] = 26,
42 [SIGPROF] = 27,
43 [SIGWINCH] = 28,
44 [SIGIO] = 29,
45 [SIGPWR] = 30,
46#ifdef SIGSYS
47 [SIGSYS] = 31,
48#endif
49#ifdef SIGEMT
50 [SIGEMT] = 32,
51#endif
52#if defined(SIGLOST) && SIGPWR != SIGLOST
53 [SIGLOST] = 33,
54#endif
55#if defined(SIGUNUSED) && \
56 defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
57 [SIGUNUSED] = 34,
58#endif
59};
60
61
62static const char *const sig_names[MAXMAPPED_SIGNAME] = {
63 "unknown",
64 "hup",
65 "int",
66 "quit",
67 "ill",
68 "trap",
69 "abrt",
70 "bus",
71 "fpe",
72 "kill",
73 "usr1",
74 "segv",
75 "usr2",
76 "pipe",
77 "alrm",
78 "term",
79 "stkflt",
80 "chld",
81 "cont",
82 "stop",
83 "stp",
84 "ttin",
85 "ttou",
86 "urg",
87 "xcpu",
88 "xfsz",
89 "vtalrm",
90 "prof",
91 "winch",
92 "io",
93 "pwr",
94 "sys",
95 "emt",
96 "lost",
97 "unused",
98
99 "exists",
100};
101
102