sig_names.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #include <linux/signal.h>
  2. #include "signal.h"
  3. /* provide a mapping of arch signal to internal signal # for mediation
  4. * those that are always an alias SIGCLD for SIGCLHD and SIGPOLL for SIGIO
  5. * map to the same entry those that may/or may not get a separate entry
  6. */
  7. static const int sig_map[MAXMAPPED_SIG] = {
  8. [0] = MAXMAPPED_SIG, /* existence test */
  9. [SIGHUP] = 1,
  10. [SIGINT] = 2,
  11. [SIGQUIT] = 3,
  12. [SIGILL] = 4,
  13. [SIGTRAP] = 5, /* -, 5, - */
  14. [SIGABRT] = 6, /* SIGIOT: -, 6, - */
  15. [SIGBUS] = 7, /* 10, 7, 10 */
  16. [SIGFPE] = 8,
  17. [SIGKILL] = 9,
  18. [SIGUSR1] = 10, /* 30, 10, 16 */
  19. [SIGSEGV] = 11,
  20. [SIGUSR2] = 12, /* 31, 12, 17 */
  21. [SIGPIPE] = 13,
  22. [SIGALRM] = 14,
  23. [SIGTERM] = 15,
  24. #ifdef SIGSTKFLT
  25. [SIGSTKFLT] = 16, /* -, 16, - */
  26. #endif
  27. [SIGCHLD] = 17, /* 20, 17, 18. SIGCHLD -, -, 18 */
  28. [SIGCONT] = 18, /* 19, 18, 25 */
  29. [SIGSTOP] = 19, /* 17, 19, 23 */
  30. [SIGTSTP] = 20, /* 18, 20, 24 */
  31. [SIGTTIN] = 21, /* 21, 21, 26 */
  32. [SIGTTOU] = 22, /* 22, 22, 27 */
  33. [SIGURG] = 23, /* 16, 23, 21 */
  34. [SIGXCPU] = 24, /* 24, 24, 30 */
  35. [SIGXFSZ] = 25, /* 25, 25, 31 */
  36. [SIGVTALRM] = 26, /* 26, 26, 28 */
  37. [SIGPROF] = 27, /* 27, 27, 29 */
  38. [SIGWINCH] = 28, /* 28, 28, 20 */
  39. [SIGIO] = 29, /* SIGPOLL: 23, 29, 22 */
  40. [SIGPWR] = 30, /* 29, 30, 19. SIGINFO 29, -, - */
  41. #ifdef SIGSYS
  42. [SIGSYS] = 31, /* 12, 31, 12. often SIG LOST/UNUSED */
  43. #endif
  44. #ifdef SIGEMT
  45. [SIGEMT] = 32, /* 7, - , 7 */
  46. #endif
  47. #if defined(SIGLOST) && SIGPWR != SIGLOST /* sparc */
  48. [SIGLOST] = 33, /* unused on Linux */
  49. #endif
  50. #if defined(SIGUNUSED) && \
  51. defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
  52. [SIGUNUSED] = 34, /* -, 31, - */
  53. #endif
  54. };
  55. /* this table is ordered post sig_map[sig] mapping */
  56. static const char *const sig_names[MAXMAPPED_SIGNAME] = {
  57. "unknown",
  58. "hup",
  59. "int",
  60. "quit",
  61. "ill",
  62. "trap",
  63. "abrt",
  64. "bus",
  65. "fpe",
  66. "kill",
  67. "usr1",
  68. "segv",
  69. "usr2",
  70. "pipe",
  71. "alrm",
  72. "term",
  73. "stkflt",
  74. "chld",
  75. "cont",
  76. "stop",
  77. "stp",
  78. "ttin",
  79. "ttou",
  80. "urg",
  81. "xcpu",
  82. "xfsz",
  83. "vtalrm",
  84. "prof",
  85. "winch",
  86. "io",
  87. "pwr",
  88. "sys",
  89. "emt",
  90. "lost",
  91. "unused",
  92. "exists", /* always last existence test mapped to MAXMAPPED_SIG */
  93. };