]> git.saurik.com Git - apple/shell_cmds.git/blame_incremental - killall/killall.1
shell_cmds-198.tar.gz
[apple/shell_cmds.git] / killall / killall.1
... / ...
CommitLineData
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.34 2005/01/17 07:44:20 ru Exp $
26.\"
27.Dd January 26, 2004
28.Os
29.Dt KILLALL 1
30.Sh NAME
31.Nm killall
32.Nd kill processes by name
33.Sh SYNOPSIS
34.Nm
35.Op Fl delmsvz
36.Op Fl help
37.Op Fl u Ar user
38.Op Fl t Ar tty
39.Op Fl c Ar procname
40.Op Fl SIGNAL
41.Op Ar procname ...
42.Sh DESCRIPTION
43The
44.Nm
45utility kills 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 a real 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 v
60Be more verbose about what will be done.
61.It Fl e
62Use the effective user ID instead of the (default) real user ID for matching
63processes specified with the
64.Fl u
65option.
66.It Fl help
67Give a help on the command usage and exit.
68.It Fl l
69List the names of the available signals and exit, like in
70.Xr kill 1 .
71.It Fl m
72Match the argument
73.Ar procname
74as a (case sensitive) regular expression against the names
75of processes found.
76CAUTION!
77This is dangerous, a single dot will match any process
78running under the real UID of the caller.
79.It Fl s
80Show only what would be done, but do not send any signal.
81.It Fl d
82Print detailed information about the processes matched,
83but do not send any signal.
84.It Fl SIGNAL
85Send a different signal instead of the default
86.Dv TERM .
87The signal may be specified either as a name
88(with or without a leading
89.Dv SIG ) ,
90or numerically.
91.It Fl u Ar user
92Limit potentially matching processes to those belonging to
93the specified
94.Ar user .
95.It Fl t Ar tty
96Limit potentially matching processes to those running on
97the specified
98.Ar tty .
99.It Fl c Ar procname
100When used with the
101.Fl u
102or
103.Fl t
104flags, limit potentially matching processes to those matching
105the specified
106.Ar procname .
107.It Fl z
108Do not skip zombies.
109This should not have any effect except to print a few error messages
110if there are zombie processes that match the specified pattern.
111.El
112.Sh ALL PROCESSES
113Sending a signal to all processes with uid
114.Em XYZ
115is already supported by
116.Xr kill 1 .
117So use
118.Xr kill 1
119for this job (e.g.\& $ kill -TERM -1 or
120as root $ echo kill -TERM -1 | su -m <user>)
121.Sh EXIT STATUS
122The
123.Nm
124command will respond with a short usage message and exit with a status
125of 2 in case of a command error.
126A status of 1 will be returned if
127either no matching process has been found or not all processes have
128been signalled successfully.
129Otherwise, a status of 0 will be
130returned.
131.Sh DIAGNOSTICS
132Diagnostic messages will only be printed if requested by
133.Fl d
134options.
135.Sh SEE ALSO
136.Xr kill 1 ,
137.Xr sysctl 3
138.Sh HISTORY
139The
140.Nm
141command appeared in
142.Fx 2.1 .
143It has been modeled after the
144.Nm
145command as available on other platforms.
146.Sh AUTHORS
147.An -nosplit
148The
149.Nm
150program was originally written in Perl and was contributed by
151.An Wolfram Schneider ,
152this manual page has been written by
153.An J\(:org Wunsch .
154The current version of
155.Nm
156was rewritten in C by
157.An Peter Wemm
158using
159.Xr sysctl 3 .