siglist.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* Canonical list of all signal names.
  2. Copyright (C) 1996-1999, 2008-2013 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* This file should be usable for any platform, since it just associates
  15. the SIG* macros with text names and descriptions. The actual values
  16. come from <bits/signum.h> (via <signal.h>). For any signal macros do not
  17. exist on every platform, we can use #ifdef tests here and still use
  18. this single common file for all platforms. */
  19. /* This file is included multiple times. */
  20. /* Duplicate values (such as SIGBUS==SIGSEGV on Haiku) favor the last
  21. list entry. */
  22. /* Standard signals */
  23. #ifdef SIGHUP
  24. init_sig (SIGHUP, "HUP", N_("Hangup"))
  25. #endif
  26. #ifdef SIGINT
  27. init_sig (SIGINT, "INT", N_("Interrupt"))
  28. #endif
  29. #ifdef SIGQUIT
  30. init_sig (SIGQUIT, "QUIT", N_("Quit"))
  31. #endif
  32. #ifdef SIGILL
  33. init_sig (SIGILL, "ILL", N_("Illegal instruction"))
  34. #endif
  35. #ifdef SIGTRAP
  36. init_sig (SIGTRAP, "TRAP", N_("Trace/breakpoint trap"))
  37. #endif
  38. #ifdef SIGABRT
  39. init_sig (SIGABRT, "ABRT", N_("Aborted"))
  40. #endif
  41. #ifdef SIGFPE
  42. init_sig (SIGFPE, "FPE", N_("Floating point exception"))
  43. #endif
  44. #ifdef SIGKILL
  45. init_sig (SIGKILL, "KILL", N_("Killed"))
  46. #endif
  47. #ifdef SIGBUS
  48. init_sig (SIGBUS, "BUS", N_("Bus error"))
  49. #endif
  50. #ifdef SIGSEGV
  51. init_sig (SIGSEGV, "SEGV", N_("Segmentation fault"))
  52. #endif
  53. #ifdef SIGPIPE
  54. init_sig (SIGPIPE, "PIPE", N_("Broken pipe"))
  55. #endif
  56. #ifdef SIGALRM
  57. init_sig (SIGALRM, "ALRM", N_("Alarm clock"))
  58. #endif
  59. #ifdef SIGTERM
  60. init_sig (SIGTERM, "TERM", N_("Terminated"))
  61. #endif
  62. #ifdef SIGURG
  63. init_sig (SIGURG, "URG", N_("Urgent I/O condition"))
  64. #endif
  65. #ifdef SIGSTOP
  66. init_sig (SIGSTOP, "STOP", N_("Stopped (signal)"))
  67. #endif
  68. #ifdef SIGTSTP
  69. init_sig (SIGTSTP, "TSTP", N_("Stopped"))
  70. #endif
  71. #ifdef SIGCONT
  72. init_sig (SIGCONT, "CONT", N_("Continued"))
  73. #endif
  74. #ifdef SIGCHLD
  75. init_sig (SIGCHLD, "CHLD", N_("Child exited"))
  76. #endif
  77. #ifdef SIGTTIN
  78. init_sig (SIGTTIN, "TTIN", N_("Stopped (tty input)"))
  79. #endif
  80. #ifdef SIGTTOU
  81. init_sig (SIGTTOU, "TTOU", N_("Stopped (tty output)"))
  82. #endif
  83. #ifdef SIGIO
  84. init_sig (SIGIO, "IO", N_("I/O possible"))
  85. #endif
  86. #ifdef SIGXCPU
  87. init_sig (SIGXCPU, "XCPU", N_("CPU time limit exceeded"))
  88. #endif
  89. #ifdef SIGXFSZ
  90. init_sig (SIGXFSZ, "XFSZ", N_("File size limit exceeded"))
  91. #endif
  92. #ifdef SIGVTALRM
  93. init_sig (SIGVTALRM, "VTALRM", N_("Virtual timer expired"))
  94. #endif
  95. #ifdef SIGPROF
  96. init_sig (SIGPROF, "PROF", N_("Profiling timer expired"))
  97. #endif
  98. #ifdef SIGWINCH
  99. init_sig (SIGWINCH, "WINCH", N_("Window changed"))
  100. #endif
  101. #ifdef SIGUSR1
  102. init_sig (SIGUSR1, "USR1", N_("User defined signal 1"))
  103. #endif
  104. #ifdef SIGUSR2
  105. init_sig (SIGUSR2, "USR2", N_("User defined signal 2"))
  106. #endif
  107. /* Variations */
  108. #ifdef SIGEMT
  109. init_sig (SIGEMT, "EMT", N_("EMT trap"))
  110. #endif
  111. #ifdef SIGSYS
  112. init_sig (SIGSYS, "SYS", N_("Bad system call"))
  113. #endif
  114. #ifdef SIGSTKFLT
  115. init_sig (SIGSTKFLT, "STKFLT", N_("Stack fault"))
  116. #endif
  117. #ifdef SIGINFO
  118. init_sig (SIGINFO, "INFO", N_("Information request"))
  119. #elif defined(SIGPWR) && (!defined(SIGLOST) || (SIGPWR != SIGLOST))
  120. init_sig (SIGPWR, "PWR", N_("Power failure"))
  121. #endif
  122. #ifdef SIGLOST
  123. init_sig (SIGLOST, "LOST", N_("Resource lost"))
  124. #endif