1 .\" $OpenBSD: kill.1,v 1.39 2016/08/16 18:51:25 schwarze Exp $
2 .\" $NetBSD: kill.1,v 1.8 1995/09/07 06:30:26 jtc Exp $
4 .\" Copyright (c) 1980, 1990, 1993
5 .\" The Regents of the University of California. All rights reserved.
7 .\" This code is derived from software contributed to Berkeley by
8 .\" the Institute of Electrical and Electronics Engineers, Inc.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)kill.1 8.2 (Berkeley) 4/28/95
36 .Dd $Mdocdate: August 16 2016 $
41 .Nd terminate or signal a process
44 .Op Fl s Ar signal_name
58 utility sends a signal to the process(es) specified
62 If no signal is specified,
66 Only the superuser may send signals to other users' processes.
68 The options are as follows:
70 .It Fl l Op Ar exit_status
71 Display the name of the signal corresponding to
74 may be the exit status of a command killed by a signal
82 If no operand is given, display the names of all the signals.
83 .It Fl s Ar signal_name
84 A symbolic signal name specifying the signal to be sent instead of the
88 A symbolic signal name specifying the signal to be sent instead of the
91 .It Fl Ar signal_number
92 A non-negative decimal integer specifying the signal to be sent instead
97 The following PIDs have special meanings:
98 .Bl -tag -width Ds -offset indent
100 If superuser, broadcast the signal to all processes; otherwise, broadcast
101 to all processes belonging to the user.
103 Send the signal to all processes whose group ID is equal to the
104 process group ID of the sender, and for which the process has permission.
106 Send the signal to all processes within the specified process group.
109 Some of the more commonly used signals:
111 .Bl -tag -width Ds -compact -offset indent
121 KILL (non-catchable, non-ignorable kill)
125 TERM (software termination signal)
128 For a more complete list, consult the
134 checks the validity of a certain PID, to see if it exists.
135 An exit code of 0 means that the specified process exists.
139 Forcibly terminate process ID 1234:
145 process the hangup signal, instructing it to re-read
159 utility is compliant with the
170 X/Open System Interfaces
174 also exists as a built-in to
178 though with a different syntax.
184 in section 8 of the manual.