xref: /minix/bin/kill/kill.1 (revision 2a404668)
1.\"	$NetBSD: kill.1,v 1.28 2017/04/22 23:01:36 christos 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 22, 2017
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 exit_status
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.Bl -tag -width Ds
67.It Fl s Ar signal_name
68A symbolic signal name specifying the signal to be sent instead of the
69default
70.Dv TERM .
71.It Fl l Op Ar exit_status
72Display the name of the signal corresponding to
73.Ar exit_status .
74.Ar exit_status
75may be the exit status of a command killed by a signal
76(see the
77special
78.Xr sh 1
79parameter
80.Sq ?\& )
81or a signal number.
82.Pp
83If no operand is given, display the names of all the signals.
84.It Fl signal_name
85A symbolic signal name specifying the signal to be sent instead of the
86default
87.Dv TERM .
88.It Fl signal_number
89A non-negative decimal integer, specifying the signal to be sent instead
90of the default
91.Dv TERM .
92.El
93.Pp
94The following pids have special meanings:
95.Bl -tag -width Ds -compact
96.It -1
97If superuser, broadcast the signal to all processes; otherwise broadcast
98to all processes belonging to the user.
99.It 0
100Broadcast the signal to all processes in the current process group
101belonging to the user.
102.El
103.Pp
104Some of the more commonly used signals:
105.Bl -tag -width Ds -compact
106.It 0
1070 (does not affect the process; can be used to test whether the
108process exists)
109.It 1
110HUP (hang up)
111.It 2
112INT (interrupt)
113.It 3
114QUIT (quit)
115.It 6
116ABRT (abort)
117.It 9
118KILL (non-catchable, non-ignorable kill)
119.It 14
120ALRM (alarm clock)
121.It 15
122TERM (software termination signal)
123.El
124.Pp
125.Nm
126is a built-in to
127.Xr csh 1 ;
128it allows job specifiers of the form ``%...'' as arguments
129so process id's are not as often used as
130.Nm
131arguments.
132See
133.Xr csh 1
134for details.
135.Sh DIAGNOSTICS
136.Ex -std
137.Sh SEE ALSO
138.Xr csh 1 ,
139.Xr pgrep 1 ,
140.Xr pkill 1 ,
141.Xr ps 1 ,
142.Xr kill 2 ,
143.Xr sigaction 2 ,
144.Xr signal 7
145.Sh STANDARDS
146The
147.Nm
148utility is expected to be
149.St -p1003.2
150compatible.
151.Sh HISTORY
152A
153.Nm
154command appeared in
155.At v3
156in section 8 of the manual.
157