1 #include <linux/signal.h>
4 #define MAXMAPPED_SIG 35
5 #define MAXMAPPED_SIGNAME (MAXMAPPED_SIG + 1)
7 /* provide a mapping of arch signal to internal signal # for mediation
8 * those that are always an alias SIGCLD for SIGCLHD and SIGPOLL for SIGIO
9 * map to the same entry those that may/or may not get a separate entry
11 static const int sig_map
[MAXMAPPED_SIG
] = {
12 [0] = MAXMAPPED_SIG
, /* existence test */
17 [SIGTRAP
] = 5, /* -, 5, - */
18 [SIGABRT
] = 6, /* SIGIOT: -, 6, - */
19 [SIGBUS
] = 7, /* 10, 7, 10 */
22 [SIGUSR1
] = 10, /* 30, 10, 16 */
24 [SIGUSR2
] = 12, /* 31, 12, 17 */
29 [SIGSTKFLT
] = 16, /* -, 16, - */
31 [SIGCHLD
] = 17, /* 20, 17, 18. SIGCHLD -, -, 18 */
32 [SIGCONT
] = 18, /* 19, 18, 25 */
33 [SIGSTOP
] = 19, /* 17, 19, 23 */
34 [SIGTSTP
] = 20, /* 18, 20, 24 */
35 [SIGTTIN
] = 21, /* 21, 21, 26 */
36 [SIGTTOU
] = 22, /* 22, 22, 27 */
37 [SIGURG
] = 23, /* 16, 23, 21 */
38 [SIGXCPU
] = 24, /* 24, 24, 30 */
39 [SIGXFSZ
] = 25, /* 25, 25, 31 */
40 [SIGVTALRM
] = 26, /* 26, 26, 28 */
41 [SIGPROF
] = 27, /* 27, 27, 29 */
42 [SIGWINCH
] = 28, /* 28, 28, 20 */
43 [SIGIO
] = 29, /* SIGPOLL: 23, 29, 22 */
44 [SIGPWR
] = 30, /* 29, 30, 19. SIGINFO 29, -, - */
46 [SIGSYS
] = 31, /* 12, 31, 12. often SIG LOST/UNUSED */
49 [SIGEMT
] = 32, /* 7, - , 7 */
51 #if defined(SIGLOST) && SIGPWR != SIGLOST /* sparc */
52 [SIGLOST
] = 33, /* unused on Linux */
54 #if defined(SIGUNUSED) && \
55 defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
56 [SIGUNUSED
] = 34, /* -, 31, - */
60 /* this table is ordered post sig_map[sig] mapping */
61 static const char *const sig_names
[MAXMAPPED_SIGNAME
] = {
98 "exists", /* always last existence test mapped to MAXMAPPED_SIG */