xref: /freebsd/usr.bin/killall/killall.1 (revision 8e6b01171e30297084bb0b4457c4183c2746aacc)
1.\" Copyright (C) 1995 by Joerg Wunsch, Dresden
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
14.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
17.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23.\" POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $Id$
26.\"
27.Dd June 25, 1995
28.Os FreeBSD 2.2
29.Dt KILLALL 1
30.Sh NAME
31.Nm killall
32.Nd kill processes by name
33.Sh SYNOPSIS
34.Nm killall
35.Op Fl d \&| Ns Fl v
36.Op Fl h \&| Ns Fl \&?
37.Op Fl help
38.Op Fl l
39.Op Fl m
40.Op Fl s
41.Op Fl SIGNAL
42.Ar procname
43.Sh DESCRIPTION
44.Nm Killall
45kills processes selected by name, as opposed to the selection by pid
46as done by
47.Xr kill 1 .
48By default, it will send a
49.Dv TERM
50signal to all processes with an effective UID identical to the
51caller of
52.Nm
53that match the name
54.Ar procname .
55The super-user is allowed to kill any process.
56.Pp
57The options are as follows:
58.Bl -tag -width 10n -offset indent
59.It Fl d \&| Ns Fl v
60Be more verbose about what will be done.  For a single
61.Fl d
62option, a list of the processes that will be sent the signal will be
63printed, or a message indicating that no matching processes have been
64found.  If the option
65.Fl d
66has been specified at least twice, the effective UID, PID, and name
67of all processes found in
68.Xr procfs 5
69will be listed in addition.
70.It Fl h \&| Ns Fl \&?
71.It Fl help
72Give a help on the command usage and exit.
73.It Fl l
74List the names of the available signals and exit, like in
75.Xr kill 1 .
76.It Fl m
77Match the argument
78.Ar procname
79as a (case insensitive) regular expression against the names
80of processes found in
81.Xr procfs 5 .
82CAUTION!  This is dangerous, a single dot will match any process
83running under the effective UID of the caller.  The regular expression
84syntax in effect is that used by
85.Xr perl 1 .
86.It Fl s
87Show only what would be done, but do net send any signal.
88.It Fl SIGNAL
89Send a different signal instead of the default
90.Dv TERM .
91The signal may be specified either as a name
92.Pq with \&or without a leading Dv SIG ,
93or numerically.
94.El
95
96.Sh DIAGNOSTICS
97The
98.Nm
99command will respond with a short usage message and exit with a status
100of 2 in case of a command error.  A status of 1 will be returned if
101either no matching process has been found or not all processes have
102been signalled succesfully.  Otherwise, a status of 0 will be
103returned.
104.Pp
105Diagnostic messages will only be printed if requested by
106.Fl d
107options.
108.Sh SEE ALSO
109.Xr kill 1 ,
110.Xr perl 1 ,
111.Xr procfs 5 .
112.Sh HISTORY
113The
114.Nm
115command appeared in FreeBSD 2.2.  It has been featured after the
116.Nm
117command as available on other platforms.
118.Sh AUTHOR
119The program has been contributed by Wolfram Schneider, this manual
120page has been written by
121.if n Joerg Wunsch.
122.if t J\(:org Wunsch.
123.Sh BUGS
124Due to limitations in the current implementation of
125.Xr procfs 5 ,
126it is only possible to figure out the effective UID of a process.
127Hence it is impossible to find processes that run setuid, thus a
128regular user will not be able to use
129.Nm
130to send signals to such processes.
131