From 5fd83771641d15c418f747bd343ba6738d3875f7 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sun, 9 May 2021 14:20:58 -0400 Subject: Import macOS userland adv_cmds-176 basic_cmds-55 bootstrap_cmds-116.100.1 developer_cmds-66 diskdev_cmds-667.40.1 doc_cmds-53.60.1 file_cmds-321.40.3 mail_cmds-35 misc_cmds-34 network_cmds-606.40.1 patch_cmds-17 remote_cmds-63 shell_cmds-216.60.1 system_cmds-880.60.2 text_cmds-106 --- shell_cmds/killall/killall.1 | 159 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 shell_cmds/killall/killall.1 (limited to 'shell_cmds/killall/killall.1') diff --git a/shell_cmds/killall/killall.1 b/shell_cmds/killall/killall.1 new file mode 100644 index 0000000..7c7b59d --- /dev/null +++ b/shell_cmds/killall/killall.1 @@ -0,0 +1,159 @@ +.\" Copyright (C) 1995 by Joerg Wunsch, Dresden +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD: src/usr.bin/killall/killall.1,v 1.34 2005/01/17 07:44:20 ru Exp $ +.\" +.Dd January 26, 2004 +.Os +.Dt KILLALL 1 +.Sh NAME +.Nm killall +.Nd kill processes by name +.Sh SYNOPSIS +.Nm +.Op Fl delmsvz +.Op Fl help +.Op Fl u Ar user +.Op Fl t Ar tty +.Op Fl c Ar procname +.Op Fl SIGNAL +.Op Ar procname ... +.Sh DESCRIPTION +The +.Nm +utility kills processes selected by name, as opposed to the selection by pid +as done by +.Xr kill 1 . +By default, it will send a +.Dv TERM +signal to all processes with a real UID identical to the +caller of +.Nm +that match the name +.Ar procname . +The super-user is allowed to kill any process. +.Pp +The options are as follows: +.Bl -tag -width 10n -offset indent +.It Fl v +Be more verbose about what will be done. +.It Fl e +Use the effective user ID instead of the (default) real user ID for matching +processes specified with the +.Fl u +option. +.It Fl help +Give a help on the command usage and exit. +.It Fl l +List the names of the available signals and exit, like in +.Xr kill 1 . +.It Fl m +Match the argument +.Ar procname +as a (case sensitive) regular expression against the names +of processes found. +CAUTION! +This is dangerous, a single dot will match any process +running under the real UID of the caller. +.It Fl s +Show only what would be done, but do not send any signal. +.It Fl d +Print detailed information about the processes matched, +but do not send any signal. +.It Fl SIGNAL +Send a different signal instead of the default +.Dv TERM . +The signal may be specified either as a name +(with or without a leading +.Dv SIG ) , +or numerically. +.It Fl u Ar user +Limit potentially matching processes to those belonging to +the specified +.Ar user . +.It Fl t Ar tty +Limit potentially matching processes to those running on +the specified +.Ar tty . +.It Fl c Ar procname +When used with the +.Fl u +or +.Fl t +flags, limit potentially matching processes to those matching +the specified +.Ar procname . +.It Fl z +Do not skip zombies. +This should not have any effect except to print a few error messages +if there are zombie processes that match the specified pattern. +.El +.Sh ALL PROCESSES +Sending a signal to all processes with uid +.Em XYZ +is already supported by +.Xr kill 1 . +So use +.Xr kill 1 +for this job (e.g.\& $ kill -TERM -1 or +as root $ echo kill -TERM -1 | su -m ) +.Sh EXIT STATUS +The +.Nm +command will respond with a short usage message and exit with a status +of 2 in case of a command error. +A status of 1 will be returned if +either no matching process has been found or not all processes have +been signalled successfully. +Otherwise, a status of 0 will be +returned. +.Sh DIAGNOSTICS +Diagnostic messages will only be printed if requested by +.Fl d +options. +.Sh SEE ALSO +.Xr kill 1 , +.Xr sysctl 3 +.Sh HISTORY +The +.Nm +command appeared in +.Fx 2.1 . +It has been modeled after the +.Nm +command as available on other platforms. +.Sh AUTHORS +.An -nosplit +The +.Nm +program was originally written in Perl and was contributed by +.An Wolfram Schneider , +this manual page has been written by +.An J\(:org Wunsch . +The current version of +.Nm +was rewritten in C by +.An Peter Wemm +using +.Xr sysctl 3 . -- cgit v1.2.3-56-ge451