1 .\" Copyright 1994 Salvatore Valente (svalente@mit.edu)
2 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
3 .\" May be distributed under the GNU General Public License
4 .TH KILL 1 "July 2014" "util-linux" "User Commands"
6 kill \- terminate a process
9 .RB [ \- \fIsignal\fR| \-s
10 .IR signal | \fB-p\fP ]
23 sends the specified \fIsignal\fR to the specified processes or process groups.
24 If no signal is specified, the TERM signal is sent. This TERM signal will kill
25 processes that do not catch it; for other processes it may be necessary to use
26 the KILL signal (number 9), since this signal cannot be caught.
28 Most modern shells have a builtin kill function, with a usage rather similar to
29 that of the command described here. The
33 options, and the possibility to specify processes by command name, are local extensions.
35 If \fIsignal\fR is 0, then no actual signal is sent, but error checking is still performed.
38 The list of processes to be signaled can be a mixture of names and pids.
43 can be one of four things:
49 is larger than 0. The process with pid
54 All processes in the current process group are signaled.
57 All processes with a pid larger than 1 are signaled.
62 is larger than 1. All processes in process group
64 are signaled. When an argument of the form '-n' is given, and it is meant to
65 denote a process group, either a signal must be specified first, or the
66 argument must be preceded by a '--' option, otherwise it will be taken as the
71 All processes invoked using this \fIname\fR will be signaled.
75 \fB\-s\fR, \fB\-\-signal\fR \fIsignal\fR
76 The signal to send. It may be given as a name or a number.
78 \fB\-l\fR, \fB\-\-list\fR [\fInumber\fR]
79 Print a list of signal names, or convert the given signal number to a name.
80 The signals can be found in
81 .I /usr/\:include/\:linux/\:signal.h
83 \fB\-L\fR, \fB\-\-table\fR
84 Similar to \fB\-l\fR, but it will print signal names and their corresponding
87 \fB\-a\fR, \fB\-\-all\fR
88 Do not restrict the command-name-to-pid conversion to processes with the same
89 uid as the present process.
91 \fB\-p\fR, \fB\-\-pid\fR
92 Only print the process id (pid) of the named processes, do not send any
96 Print pid(s) that will be signaled with kill along with the signal.
98 \fB\-q\fR, \fB\-\-queue\fR \fIvalue\fR
105 argument is an integer that is sent along with the signal. If the
106 receiving process has installed a handler for this signal using the SA_SIGINFO
109 then it can obtain this data via the si_sigval field of the siginfo_t structure.
112 It is not possible to send a signal to an explicitly selected thread in a
113 multithreaded process using the
117 is used to send a signal to a thread group, then the kernel selects an arbitrary
118 member of the thread group that has not blocked the signal. For more details
121 the CLONE_THREAD description.
125 as well as system call
127 accept a TID (thread ID, see
129 as an argument. In this case the kill behavior is not changed and the signal is
130 also delivered to the thread group rather than to the specified thread.
134 has the following return codes:
143 partial success (when more than one process specified)
162 The original version was taken from BSD 4.4.
165 The kill command is part of the util-linux package and is available from
166 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/