Advertisement
rfmonk

Signal_types.txt

Jan 19th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.74 KB | None | 0 0
  1. SIGABRT
  2. A process is sent this signal when it calls the abort() function
  3. Terminating a Process Abnormally: abort()
  4. By default, this signal terminates the process with a core dump.
  5. This achieves the intended purpose of the abort() call: to produce
  6. a core dump for debugging.
  7.  
  8. SIGALRM
  9. The kernel generates this signal upon the expiration of a real-time
  10. timer set by a call to alarm() or setitimer(). A real-time timer is
  11. one that counts according to wall clock time.
  12. i.e. The human notion of elapsed time.
  13.  
  14. SIGBUS
  15. This signal ("bus error") is generated to indicate certain kinds of
  16. memory-access errors. One such error can occur when using memory
  17. mappings created with mmap(), if we attempt to access an address
  18. that lies beyond the end of the underlying memory-mapped file.
  19.  
  20. SIGCHLD
  21. This signal is sent by the kernel to the parent process when one its
  22. children terminates (either by calling exit() or as a result of
  23. being killed by a signal). It may also be sent to a process when one
  24. of its children is stopped or resumed by a signal.
  25.  
  26. SIGCLD
  27. This is a synonym for SIGCHLD
  28.  
  29. SIGCONT
  30. When sent to a stopped process, this signal causes the process to
  31. resume (i.e., to be rescheduled to run at a later time). When
  32. received by a process that is not currently stopped, this signal is
  33. ignored by default. A process may catch this signal, so that it
  34. carries out some action when it resumes.
  35.  
  36. SIGEMT
  37. In UNIX systems generally, this signal is used to indicate an
  38. implementation-dependent hardware error. On Linux, this signal
  39. is used only in the Sun SPARC implementation. The suffix EMT
  40. derives from emulator trap, an assembler mnemonic on the digital
  41. PDP-11
  42.  
  43. SIGFPE
  44. This signal is generated for certain types of arithmatic errors
  45. such as divide-by-zero. The suffix FPE is an abbreviation for
  46. floating-point exception, although this signal can also be
  47. generated for arithmatic errors. The precise details of when the
  48. signal is generated depend on the hardware architecture and the
  49. settings of CPU control registers. For example, on x86-32, integer
  50. divide-by-zero always yields SIGFPE, but the handling of floating
  51. point divide by zero depends on whether the FE_DIVBYZERO exception
  52. has been enabled. If this exception is enabled (using feenableexcept())
  53. then a floating-point divide-by-zero generates SIGFPE; otherwise
  54. it yields the IEEE standard result for the operands (a floating-
  55. point representation of infinity). See the fenv(3) manual page and
  56. <fenv.h> for further information.
  57.  
  58. SIGHUP
  59. When a terminal disconnect (hangup) occurs, this signal is sent
  60. to the controlling process of the terminal. We describe the concept
  61. of a controlling process and which SIGHUP is sent later.
  62. A second use of SIGHUP is with daemons (e.g. init, httpd, inetd)
  63. Many daemons are designed to respond to the receipt of SIGHUP by
  64. reinitializing themselves and rereading their config files. The sys
  65. admin triggers these actions by manually sending SIGHUP to the daemon
  66. either by using an explicit kill command or by executing a program
  67. or script that does the same.
  68.  
  69. SIGILL
  70. This signal is sent to a process if it tries to execute an illegal
  71. (i.e. incorrectly formed) machine language instruction.
  72.  
  73. SIGINFO
  74. On Linux, this signal name is synonymous with SIGPWR. On BSD sys
  75. the SIGINFO signal, generated by typing controll T, is used to
  76. obtain status information about the foreground process group.
  77.  
  78. SIGINT
  79. When the user types the terminal interrupt character (usually
  80. control c) the terminal driver sends the signal to the foreground
  81. process group. The default action for this signal is to terminate
  82. the process.
  83.  
  84. SIGIO
  85. Using the fcntl() system call, it is possible to arrange for this
  86. signal to be generated when an I/0 event (e.g., input becoming
  87. available) occurs on certain types of open file descriptors, such
  88. those for terminals and sockets.
  89.  
  90. SIGIOT
  91. On Linux, this is a synonym for SIGABRT. On some other UNIX imp-
  92. lementations, this signal indicates an implementation defined
  93. hardware fault.
  94.  
  95. SIGKILL
  96. This is the sure kill signal. It can't be blocked, ignored, or
  97. caught by the handler, and thus always terminates a process.
  98.  
  99. SIGLOST
  100. This signal name exists on Linux, but is unused. On some other
  101. UNIX implementations, the NFS client sends this signal to the
  102. to the local processes holding locks if the NSF client fails
  103. to regain locks held by those processes following the recovery of a
  104. remote NFS server that crashed. (This feature is not standardized
  105. in the NFS spec).
  106.  
  107. SIGPIPE
  108. This signal, which is derived from the System V, is a synonym
  109. for SIGIO on Linux.
  110.  
  111. SIGPROF
  112. The kernel generates this signal upon the expiration of a profiling
  113. timer set by a call to setitimer(). A profiling timer is one that
  114. counts the CPU time used by a process. Unlike a virtual timer
  115. (see SIGVTALRM), a profiling timer counts CPU time used in both
  116. user mode and kernel mode.
  117.  
  118. SIGPWR
  119. This is the power failure signal. On systems that have UPS, it is
  120. possible to set up a daemon process that monitors the backup battery
  121. level in the event of a power failure. If the battery power is
  122. about to run out (after an extended power outage), then the
  123. monitoring process sends SIGPWR to the init process, which interprets
  124. this signal as a request to shut down the system in a quick and
  125. orderly fashion.
  126.  
  127. SIGQUIT
  128. When the user types the quit character (usually Control-\) on the
  129. keyboard, this signal is sent to the foreground process group. By
  130. default, this signal terminates a process and causes it to produce
  131. a core dump, which can then be used for debugging, Using SIGQUIT
  132. in this manner is useful for a program that is stuck in an infinate
  133. loop or is otherwise not responding. By typing control \ and then
  134. loading the resulting core dump with gdb and using backtrace
  135. command to obtain a stack trace, we can find out which part of the
  136. program code was executing.
  137.  
  138. SIGSEGV
  139. This very popular signal is generated when a program makes an
  140. invalid memory reference. A memory reference may be invalid because
  141. the referenced page doesn't exist. (e.g. it lies in an unmapped
  142. area somewhere between the heap and the stack), the process tried
  143. to update a location in read only memory (e.g., the program
  144. text segment or a region of mapped memory marked read-only) or
  145. the process tried to access part of the kernel memory while
  146. running in user mode (The Core Operating System: The Kernel). In
  147. C, these events often result from dereferencing a pointer containing
  148. a bad address (e.g., an uninitialized pointer) or passing an
  149. invalid argument in a function call. The name of this signal derives
  150. from the term segmentation violation.
  151.  
  152. SIGSTKFLT
  153. Documented in signal(7) as "stack fault on coprocessor," this signal
  154. is defined, but is unused on Linux.
  155.  
  156. SIGSTOP
  157. This is the sure stop signal. It can't be blocked, ignored, or
  158. caught by a handler; thus, it always stops a process.
  159.  
  160. SIGSYS
  161. This signal is generated if a process makes a "bad" system call.
  162. This means that the process executed an instruction that was in-
  163. terpreted as a system call trap, but the associated system call
  164. number was not valid.
  165.  
  166. SIGTERM
  167. This is the standard signal used for terminating a process and
  168. is the default signal sent by the kill and killall commands.
  169. Users sometimes explicitly send the SIGKILL signal to a process
  170. using kill -KILL or kill -9. However, this is generally a
  171. mistake. A well designed application will have a handler for SIGTERM
  172. that causes the application to exit gracefully, cleaning up temp
  173. files and releasing other resources beforehand. Killing a process
  174. with SIGKILL bypasses the SIGTERM handler. Thus, we should always
  175. first attempt to terminate a process using SIGTERM, and
  176. reserve SIGKILL as a last resort for killing runaway processes
  177. that don't respond to SIGTERM.
  178.  
  179. SIGTRAP
  180. This signal is used to implement debugger breakpoints and system
  181. call tracing, as performed by strace(1). See ptrace(2) manual page
  182. for further information.
  183.  
  184. SIGTSTP
  185. This is the job-control stop signal, sent to stop the foreground
  186. process group when the user types the suspend character Ctrl+Z
  187.  
  188. SIGTTIN
  189. When running under a job-control shell, the terminal driver sends
  190. this signal to a background process group when it attempts to
  191. read() from the terminal. This signal stops a process by default.
  192.  
  193. SIGTTOU
  194. This signal serves an analogous purpose to SIGTTIN, but for
  195. terminal output by background jobs. When running under a job-
  196. control shell, if the TOSTOP (terminal output stop) option
  197. has been enabled for the terminal (perhaps via the command stty
  198. tostop), the terminal driver sends SIGTTOU to a background
  199. process group when it attempts to write() to the terminal.
  200.  
  201. SIGUNUSED
  202. As the name implies, this signal is unused. On Linux 2.4 and later,
  203. this signal name is synonymous with SIGSYS on many architectures,
  204. although the signal name remains for backward compatibility.
  205.  
  206. SIGURG
  207. This signal is sent to a process to indicate the presence of
  208. out-of-band (also known as urgent) data on a socket.
  209.  
  210. SIGUSR1
  211. This signal and SIGUSR2 are available for programmer-defined
  212. purposes. The kernel never generates these signals for a process.
  213. Processes may use these signals to notify one another of events
  214. or to synchronize with each other. In early UNIX implementations
  215. these were the only two signals that could be freely used in
  216. applications. (In fact, processes can send one another any signal,
  217. but this has the potential for confusion if the kernel also
  218. generates one of the signals for a process.) Modern UNIX implement-
  219. ations provide a large set of realtime signals that are also
  220. available for programmer-defined purposes.
  221.  
  222. SIGVTALRM
  223. The kernel generates this signal upon expiration of a virtual
  224. timer set by a call to setitimer(). A virtual timer is one that
  225. counts the user-mode CPU time used by a process.
  226.  
  227. SIGWINCH
  228. In a windowing environment, this signal is sent to the foreground
  229. process group when the terminal window size changes (as a
  230. consequence either of the user manually resizing it, or of a
  231. program resizing it via a call to ioctl(). By installing a handler
  232. for this signal, programs such as vi and less can know to redraw
  233. their output after a change in window size.
  234.  
  235. SIGXFSZ
  236. This signal is sent to a process if it attempts (using write() or
  237. truncate()) to increase the size of the file beyond the process's
  238. file size resource limit (RLIMIT_FSIZE.)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement