manpages: Uniformly order the prologue macros by Dd/Dt/Os.
[dragonfly.git] / usr.bin / killall / killall.1
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 .\" $FreeBSD: src/usr.bin/killall/killall.1,v 1.11.2.11 2003/02/25 20:31:18 trhodes Exp $
26 .\"
27 .Dd June 25, 1995
28 .Dt KILLALL 1
29 .Os
30 .Sh NAME
31 .Nm killall
32 .Nd kill processes by name
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl d | v
36 .Op Fl q
37 .Op Fl h | ?\&
38 .Op Fl help
39 .Op Fl l
40 .Op Fl m
41 .Op Fl s
42 .Op Fl u Ar user
43 .Op Fl t Ar tty
44 .Op Fl c Ar procname
45 .Op Fl j Ar jail
46 .Op Fl SIGNAL
47 .Op Ar procname ...
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility kills processes selected by name, as opposed to the selection by pid
52 as done by
53 .Xr kill 1 .
54 By default, it will send a
55 .Dv TERM
56 signal to all processes with a real UID identical to the
57 caller of
58 .Nm
59 that match the name
60 .Ar procname .
61 The super-user is allowed to kill any process.
62 .Pp
63 The options are as follows:
64 .Bl -tag -width 10n -offset indent
65 .It Fl q
66 Do not print an error message if no matching processes are found.
67 .It Fl d | v
68 Be more verbose about what will be done.  For a single
69 .Fl d
70 option, a list of the processes that will be sent the signal will be
71 printed, or a message indicating that no matching processes have been
72 found.
73 .It Fl h | ?\&
74 .It Fl help
75 Give a help on the command usage and exit.
76 .It Fl l
77 List the names of the available signals and exit, like in
78 .Xr kill 1 .
79 .It Fl m
80 Match the argument
81 .Ar procname
82 as a (case insensitive) regular expression against the names
83 of processes found.
84 CAUTION!  This is dangerous, a single dot will match any process
85 running under the real UID of the caller.
86 .It Fl s
87 Show only what would be done, but do not send any signal.
88 .It Fl SIGNAL
89 Send a different signal instead of the default
90 .Dv TERM .
91 The signal may be specified either as a name
92 (with or without a leading
93 .Dv SIG ) ,
94 or numerically.
95 .It Fl u Ar user
96 Limit potentially matching processes to those belonging to
97 the specified
98 .Ar user .
99 .It Fl t Ar tty
100 Limit potentially matching processes to those running on
101 the specified
102 .Ar tty .
103 .It Fl j Ar jailid
104 Limit potentially matching processes to those running in the jail with id
105 .Ar jailid .
106 .It Fl c Ar procname
107 When used with the
108 .Fl u
109 or
110 .Fl t
111 flags, limit potentially matching processes to those matching
112 the specified
113 .Ar procname .
114 .El
115 .Sh ALL PROCESSES
116 Sending a signal to all processes with uid
117 .Em XYZ
118 is already supported by
119 .Xr kill 1 .
120 So use
121 .Xr kill 1
122 for this job (e.g. $ kill -TERM -1 or
123 as root $ echo kill -TERM -1 | su -m <user>)
124 .Sh DIAGNOSTICS
125 The
126 .Nm
127 command will respond with a short usage message and exit with a status
128 of 2 in case of a command error.  A status of 1 will be returned if
129 either no matching process has been found or not all processes have
130 been signalled successfully.  Otherwise, a status of 0 will be
131 returned.
132 .Pp
133 Diagnostic messages will only be printed if requested by
134 .Fl d
135 options.
136 .Sh SEE ALSO
137 .Xr kill 1 ,
138 .Xr sysctl 3
139 .Sh HISTORY
140 The
141 .Nm
142 command appeared in
143 .Fx 2.1 .
144 It has been modeled after the
145 .Nm
146 command as available on other platforms.
147 .Sh AUTHORS
148 .An -nosplit
149 The
150 .Nm
151 program was originally written in Perl and was contributed by
152 .An Wolfram Schneider ,
153 this manual page has been written by
154 .An J\(:org Wunsch .
155 The current version of
156 .Nm
157 was rewritten in C by
158 .An Peter Wemm
159 using
160 .Xr sysctl 3 .