kill 中文man页面

系统
kill 给指定进程发送指定信号. 如果没有指定信号, 则发送 TERM 信号. TERM 信号会杀死不能俘获该信号的进程. 对于其他进程, 可能需要使用 KILL (9) 信号, 因为该信号不能够被俘获. 大多数现代的 shell 有一个内嵌的 kill 函数.

NAME (名称)

kill - 终止进程  

SYNOPSIS(总览)

kill[-ssignal|-p][-a]pid...
kill -l [ signal ]  

DESCRIPTION (描述)

kill 给指定进程发送指定信号. 如果没有指定信号, 则发送 TERM 信号. TERM 信号会杀死不能俘获该信号的进程. 对于其他进程, 可能需要使用 KILL (9) 信号, 因为该信号不能够被俘获. 大多数现代的 shell 有一个内嵌的 kill 函数.  

OPTIONS (选项)

pid ...
kill 指定一个该发信号的进程列表. 每个 pid 可为下面四种之一. 进程名 在这种情况下,发信号给所命名的进程. n 这里的 n 大于 0. 将发信号给 pid 为 n 的进程. -1 在这种情况下, 只要发信号的用户能够控制那些进行, 将发信号给所有从 MAX_INT 到 2 的进程. -n 这里的 n 大于 1, 在这种情况下, 发信号给属于进程组 n 的进程. 如果给定一个负的参数, 那么信号 必须 首先声明, 否则它会被当作信号发送出去.
-s
指定发送的信号. 信号可以以信号名或数字的方式给定.
-p
指定 kill 只打印命名进程的进程标识 (pid) , 而不应发送给它信号.
-l
打印信号名的列表.这可以在 /usr/include/linux/signal.h 中找到.

SEE ALSO (又见)

bash(1), tcsh(1), kill(2), sigvec(2)  

#p#

NAME

kill - terminate a process  

SYNOPSIS

kill [ -s signal | -p ] [ -a ] [ -- ] pid ...
kill -l [ signal ]  

DESCRIPTION

The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught.

Most modern shells have a builtin kill function, with a usage rather similar to that of the command described here. The `-a' and `-p' options, and the possibility to specify pids by command name is a local extension.  

OPTIONS

pid...
Specify the list of processes that kill should signal. Each pid can be one of five things:
n
where n is larger than 0. The process with pid n will be signaled.
0
All processes in the current process group are signaled.
-1
All processes with pid larger than 1 will be signaled.
-n
where n is larger than 1. All processes in process group n are signaled. When an argument of the form `-n' is given, and it is meant to denote a process group, either the signal must be specified first, or the argument must be preceded by a `--' option, otherwise it will be taken as the signal to send.
commandname
All processes invoked using that name will be signaled.
-s signal
Specify the signal to send. The signal may be given as a signal name or number.
-l
Print a list of signal names. These are found in /usr/include/linux/signal.h
-a
Do not restrict the commandname-to-pid conversion to processes with the same uid as the present process.
-p
Specify that kill should only print the process id (pid) of the named processes, and not send any signals.

SEE ALSO

bash(1), tcsh(1), kill(2), sigvec(2), signal(7)  

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-16 10:59:16

pwconv中文man

2011-08-18 19:02:43

environ中文man

2011-08-25 17:43:07

snprintf中文man

2011-08-19 18:30:52

ipc中文man

2011-08-24 15:35:52

hier中文man

2011-08-25 17:18:07

putc中文man

2011-08-15 13:53:19

stat中文man

2011-08-16 10:10:58

setup中文man

2011-08-25 15:24:31

execlp中文man

2011-08-25 18:24:12

termios中文man

2011-08-15 18:06:07

restore中文man

2011-08-24 17:26:35

reindex中文man

2011-08-25 16:55:26

gets中文man

2011-08-15 15:45:04

xpdf中文man

2011-08-24 17:06:42

NOTIFY中文man
点赞
收藏

51CTO技术栈公众号