Upload Tizen:Base source
[framework/base/util-linux-ng.git] / misc-utils / kill.1
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
8 .B kill
9 .RB [ \-s
10 .IR signal  | \fB\-p\fP ]
11 .RN [ \-a ]
12 .RB [ \-\- ]
13 .IR pid ...
14 .br
15 .B kill -l
16 .RI [ signal ]
17 .SH DESCRIPTION
18 The command
19 .B kill
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.
29 .PP
30 If sig is 0, then no signal is sent, but error checking is still performed.
31 .SH OPTIONS
32 .TP
33 .IR pid ...
34 Specify the list of processes that
35 .B kill
36 should signal.  Each
37 .I pid
38 can be one of five things:
39
40 .RS
41 .TP
42 .I n
43 where
44 .I n
45 is larger than 0.  The process with pid
46 .I n
47 will be signaled.
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
56 where
57 .I n
58 is larger than 1.
59 All processes in process group
60 .I n
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
69 .TP
70 .BI \-s " signal"
71 Specify the signal to send.
72 The signal may be given as a signal name or number.
73 .TP
74 .B \-l
75 Print a list of signal names.  These are found in
76 .I /usr/include/linux/signal.h
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.
87 .SH "SEE ALSO"
88 .BR bash (1),
89 .BR tcsh (1),
90 .BR kill (2),
91 .BR sigvec (2),
92 .BR signal (7)
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>.
96 .SH AVAILABILITY
97 The kill command is part of the util-linux-ng package and is available from
98 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.