]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
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 "14 October 1994" "Linux Utilities" "Linux Programmer's Manual" | |
5 | .SH NAME | |
6 | kill \- terminate a process | |
7 | .SH SYNOPSIS | |
b0315e1f PB |
8 | .B kill |
9 | .RB [ \-s | |
10 | .IR signal | \fB\-p\fP ] | |
11 | .RN [ \-a ] | |
12 | .RB [ \-\- ] | |
13 | .IR pid ... | |
6dbe3af9 | 14 | .br |
b0315e1f PB |
15 | .B kill -l |
16 | .RI [ signal ] | |
6dbe3af9 | 17 | .SH DESCRIPTION |
c07ebfa1 | 18 | The command |
6dbe3af9 | 19 | .B kill |
c07ebfa1 KZ |
20 | sends the specified signal to the specified process or process group. |
21 | If no signal is specified, the TERM signal is sent. The TERM signal | |
22 | will kill processes which do not catch this signal. For other processes, | |
23 | it may be necessary to use the KILL (9) signal, since this signal cannot | |
24 | be caught. | |
25 | .PP | |
26 | Most modern shells have a builtin kill function, with a usage rather similar | |
27 | to that of the command described here. The `-a' and `-p' options, | |
28 | and the possibility to specify pids by command name is a local extension. | |
bd0fb63d KZ |
29 | .PP |
30 | If sig is 0, then no signal is sent, but error checking is still performed. | |
6dbe3af9 KZ |
31 | .SH OPTIONS |
32 | .TP | |
c07ebfa1 | 33 | .IR pid ... |
6dbe3af9 KZ |
34 | Specify the list of processes that |
35 | .B kill | |
36 | should signal. Each | |
37 | .I pid | |
c07ebfa1 KZ |
38 | can be one of five things: |
39 | ||
40 | .RS | |
41 | .TP | |
fd6b7a7f KZ |
42 | .I n |
43 | where | |
44 | .I n | |
45 | is larger than 0. The process with pid | |
46 | .I n | |
47 | will be signaled. | |
c07ebfa1 KZ |
48 | .TP |
49 | .B 0 | |
50 | All processes in the current process group are signaled. | |
51 | .TP | |
52 | .B -1 | |
53 | All processes with pid larger than 1 will be signaled. | |
54 | .TP | |
55 | .BI - n | |
b0315e1f PB |
56 | where |
57 | .I n | |
c07ebfa1 KZ |
58 | is larger than 1. |
59 | All processes in process group | |
fd6b7a7f | 60 | .I n |
c07ebfa1 KZ |
61 | are signaled. When an argument of the form `-n' is given, |
62 | and it is meant to denote a process group, | |
63 | either the signal must be specified first, or the argument must be preceded | |
64 | by a `--' option, otherwise it will be taken as the signal to send. | |
65 | .TP | |
66 | .I commandname | |
67 | All processes invoked using that name will be signaled. | |
68 | .RE | |
6dbe3af9 | 69 | .TP |
c07ebfa1 | 70 | .BI \-s " signal" |
6dbe3af9 KZ |
71 | Specify the signal to send. |
72 | The signal may be given as a signal name or number. | |
73 | .TP | |
c07ebfa1 | 74 | .B \-l |
6dbe3af9 KZ |
75 | Print a list of signal names. These are found in |
76 | .I /usr/include/linux/signal.h | |
c07ebfa1 KZ |
77 | .TP |
78 | .B \-a | |
79 | Do not restrict the commandname-to-pid conversion to processes | |
80 | with the same uid as the present process. | |
81 | .TP | |
82 | .B \-p | |
83 | Specify that | |
84 | .B kill | |
85 | should only print the process id (pid) | |
86 | of the named processes, and not send any signals. | |
6dbe3af9 KZ |
87 | .SH "SEE ALSO" |
88 | .BR bash (1), | |
89 | .BR tcsh (1), | |
90 | .BR kill (2), | |
c07ebfa1 KZ |
91 | .BR sigvec (2), |
92 | .BR signal (7) | |
6dbe3af9 KZ |
93 | .SH AUTHOR |
94 | Taken from BSD 4.4. The ability to translate process names to process | |
95 | ids was added by Salvatore Valente <svalente@mit.edu>. | |
86d62711 | 96 | .SH AVAILABILITY |
601d12fb KZ |
97 | The kill command is part of the util-linux package and is available from |
98 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |