kill -3是什么意思?


19

我知道这kill -9是什么意思,但是任何人都可以解释什么kill -3意思?它发出任何特殊信号吗?


7
你试过了man kill吗?
塔玛拉·威斯曼

5
@ TomWijsman,man kill不会列出信号,并且man信号根本不显示任何内容。这实际上是您在Google上搜索“ kill -3”时发现的第一个有用的工具。:)轻松查看'kill -l'选项确实很容易,尤其是如果您不太了解信号的话。
Ape-in​​ago13年

2
@ Ape-in​​ago:足够简短,不能跳过一个选项,但是可以澄清寻找帮助的内容,谢谢;kill -l确实列出了摘要,如果您想知道man 7 signal是否将其详细列出。这是当前接受的答案中的表格可能来自的地方。
塔玛拉·威斯曼

Answers:


30

原始POSIX.1-1990标准中描述的信号:

   Signal     Value     Action   Comment
   -------------------------------------------------------------------------
   SIGHUP        1       Term    Hangup detected on controlling terminal
                                 or death of controlling process
   SIGINT        2       Term    Interrupt from keyboard
   SIGQUIT       3       Core    Quit from keyboard
   SIGILL        4       Core    Illegal Instruction
   SIGABRT       6       Core    Abort signal from abort(3)
   SIGFPE        8       Core    Floating point exception
   SIGKILL       9       Term    Kill signal
   SIGSEGV      11       Core    Invalid memory reference
   SIGPIPE      13       Term    Broken pipe: write to pipe with no readers
   SIGALRM      14       Term    Timer signal from alarm(2)
   SIGTERM      15       Term    Termination signal
   SIGUSR1   30,10,16    Term    User-defined signal 1
   SIGUSR2   31,12,17    Term    User-defined signal 2
   SIGCHLD   20,17,18    Ign     Child stopped or terminated
   SIGCONT   19,18,25    Cont    Continue if stopped
   SIGSTOP   17,19,23    Stop    Stop process
   SIGTSTP   18,20,24    Stop    Stop typed at tty
   SIGTTIN   21,21,26    Stop    tty input for background process
   SIGTTOU   22,22,27    Stop    tty output for background process

4
不幸的是,这些信号的数值在操作系统之间甚至架构之间都不同。
grawity 2011年


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.