信号常量


以下信号常量由 os.constants.signals 导出。

常量 描述
SIGHUP 发送以指示控制终端何时关闭或父进程退出。
SIGINT
SIGQUIT 发送以指示用户何时希望终止进程并执行核心转储。
SIGILL 发送给进程以通知其已尝试执行非法、格式错误、未知、或特权指令。
SIGTRAP 发生异常时发送给进程。
SIGABRT 发送给进程以请求其中止。
SIGIOT SIGABRT 的同义词
SIGBUS 发送给进程以通知其已导致总线错误。
SIGFPE 发送给进程以通知其执行了非法的算术运算。
SIGKILL 发送给进程以立即终止其。
SIGUSR1 SIGUSR2 发送给进程以识别用户定义的条件。
SIGSEGV 发送给进程以通知分段错误。
SIGPIPE 当进程尝试写入断开的管道时发送给进程。
SIGALRM 当系统定时器结束时发送给进程。
SIGTERM 发送给进程以请求终止。
SIGCHLD 当子进程终止时发送给进程。
SIGSTKFLT 发送给进程以指示协处理器上的堆栈错误。
SIGCONT 发送以指示操作系统继续暂停的进程。
SIGSTOP 发送以指示操作系统停止进程。
SIGTSTP 发送给进程以请求停止。
SIGBREAK 发送以指示用户何时希望中断进程。
SIGTTIN 在后台从终端读取时发送给进程。
SIGTTOU 在后台写入终端时发送给进程。
SIGURG 当套接字有紧急数据要读取时发送给进程。
SIGXCPU 当进程超过其 CPU 使用限制时发送给进程。
SIGXFSZ 当文件增长超过允许的最大值时发送给进程。
SIGVTALRM 当虚拟定时器已过时时发送给进程。
SIGPROF 当系统定时器已过时发送给进程。
SIGWINCH 当控制终端改变其大小时发送给进程。
SIGIO 当 I/O 可用时发送给进程。
SIGPOLL SIGIO 的同义词
SIGLOST 当文件锁丢失时发送给进程。
SIGPWR 发送给进程以通知电源故障。
SIGINFO SIGPWR 的同义词
SIGSYS 发送给进程以通知错误的参数。
SIGUNUSED SIGSYS 的同义词

The following signal constants are exported by os.constants.signals.

Constant Description
SIGHUP Sent to indicate when a controlling terminal is closed or a parent process exits.
SIGINT Sent to indicate when a user wishes to interrupt a process ((Ctrl+C)).
SIGQUIT Sent to indicate when a user wishes to terminate a process and perform a core dump.
SIGILL Sent to a process to notify that it has attempted to perform an illegal, malformed, unknown, or privileged instruction.
SIGTRAP Sent to a process when an exception has occurred.
SIGABRT Sent to a process to request that it abort.
SIGIOT Synonym for SIGABRT
SIGBUS Sent to a process to notify that it has caused a bus error.
SIGFPE Sent to a process to notify that it has performed an illegal arithmetic operation.
SIGKILL Sent to a process to terminate it immediately.
SIGUSR1 SIGUSR2 Sent to a process to identify user-defined conditions.
SIGSEGV Sent to a process to notify of a segmentation fault.
SIGPIPE Sent to a process when it has attempted to write to a disconnected pipe.
SIGALRM Sent to a process when a system timer elapses.
SIGTERM Sent to a process to request termination.
SIGCHLD Sent to a process when a child process terminates.
SIGSTKFLT Sent to a process to indicate a stack fault on a coprocessor.
SIGCONT Sent to instruct the operating system to continue a paused process.
SIGSTOP Sent to instruct the operating system to halt a process.
SIGTSTP Sent to a process to request it to stop.
SIGBREAK Sent to indicate when a user wishes to interrupt a process.
SIGTTIN Sent to a process when it reads from the TTY while in the background.
SIGTTOU Sent to a process when it writes to the TTY while in the background.
SIGURG Sent to a process when a socket has urgent data to read.
SIGXCPU Sent to a process when it has exceeded its limit on CPU usage.
SIGXFSZ Sent to a process when it grows a file larger than the maximum allowed.
SIGVTALRM Sent to a process when a virtual timer has elapsed.
SIGPROF Sent to a process when a system timer has elapsed.
SIGWINCH Sent to a process when the controlling terminal has changed its size.
SIGIO Sent to a process when I/O is available.
SIGPOLL Synonym for SIGIO
SIGLOST Sent to a process when a file lock has been lost.
SIGPWR Sent to a process to notify of a power failure.
SIGINFO Synonym for SIGPWR
SIGSYS Sent to a process to notify of a bad argument.
SIGUNUSED Synonym for SIGSYS