xref: /netbsd-src/bin/kill/kill.1 (revision aaf4ece63a859a04e37cf3a7229b5fab0157cc06)
1.\"	$NetBSD: kill.1,v 1.18 2003/08/07 09:05:13 agc Exp $
2.\"
3.\" Copyright (c) 1980, 1990, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" the Institute of Electrical and Electronics Engineers, Inc.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\"	@(#)kill.1	8.2 (Berkeley) 4/28/95
34.\"
35.Dd April 28, 1995
36.Dt KILL 1
37.Os
38.Sh NAME
39.Nm kill
40.Nd terminate or signal a process
41.Sh SYNOPSIS
42.Nm
43.Op Fl s Ar signal_name
44.Ar pid
45\&...
46.Nm
47.Fl l
48.Op Ar signal_number
49.Nm
50.Fl signal_name
51.Ar pid
52\&...
53.Nm
54.Fl signal_number
55.Ar pid
56\&...
57.Sh DESCRIPTION
58The
59.Nm
60utility sends a signal to the process(es) specified
61by the pid operand(s).
62.Pp
63Only the super-user may send signals to other users' processes.
64.Pp
65The options are as follows:
66.Pp
67.Bl -tag -width Ds
68.It Fl s Ar signal_name
69A symbolic signal name specifying the signal to be sent instead of the
70default
71.Dv TERM .
72.It Fl l Op Ar signal_number
73If no operand is given, list the signal names; otherwise, write
74the signal name corresponding to
75.Ar signal_number
76provided.
77.It Fl signal_name
78A symbolic signal name specifying the signal to be sent instead of the
79default
80.Dv TERM .
81.It Fl signal_number
82A non-negative decimal integer, specifying the signal to be sent instead
83of the default
84.Dv TERM .
85.El
86.Pp
87The following pids have special meanings:
88.Bl -tag -width Ds -compact
89.It -1
90If superuser, broadcast the signal to all processes; otherwise broadcast
91to all processes belonging to the user.
92.It 0
93Broadcast the signal to all processes in the current process group
94belonging to the user.
95.El
96.Pp
97Some of the more commonly used signals:
98.Bl -tag -width Ds -compact
99.It 1
100HUP (hang up)
101.It 2
102INT (interrupt)
103.It 3
104QUIT (quit)
105.It 6
106ABRT (abort)
107.It 9
108KILL (non-catchable, non-ignorable kill)
109.It 14
110ALRM (alarm clock)
111.It 15
112TERM (software termination signal)
113.El
114.Pp
115.Nm
116is a built-in to
117.Xr csh  1  ;
118it allows job specifiers of the form ``%...'' as arguments
119so process id's are not as often used as
120.Nm
121arguments.
122See
123.Xr csh  1
124for details.
125.Sh SEE ALSO
126.Xr csh 1 ,
127.Xr pgrep 1 ,
128.Xr pkill 1 ,
129.Xr ps 1 ,
130.Xr kill 2 ,
131.Xr sigaction 2 ,
132.Xr signal 7
133.Sh STANDARDS
134The
135.Nm
136function is expected to be
137.St -p1003.2
138compatible.
139.Sh HISTORY
140A
141.Nm
142command appeared in
143.At v6 .
144