19ddb49cbSWarner Losh.\"- 24b88c807SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1993 34b88c807SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 44b88c807SRodney W. Grimes.\" 54b88c807SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 64b88c807SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 74b88c807SRodney W. Grimes.\" 84b88c807SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 94b88c807SRodney W. Grimes.\" modification, are permitted provided that the following conditions 104b88c807SRodney W. Grimes.\" are met: 114b88c807SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 124b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 134b88c807SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 144b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 154b88c807SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 16fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 174b88c807SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 184b88c807SRodney W. Grimes.\" without specific prior written permission. 194b88c807SRodney W. Grimes.\" 204b88c807SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 214b88c807SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 224b88c807SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 234b88c807SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 244b88c807SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 254b88c807SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 264b88c807SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274b88c807SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 284b88c807SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 294b88c807SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 304b88c807SRodney W. Grimes.\" SUCH DAMAGE. 314b88c807SRodney W. Grimes.\" 325c10b071SSevan Janiyan.Dd October 3, 2016 334b88c807SRodney W. Grimes.Dt KILL 1 344b88c807SRodney W. Grimes.Os 354b88c807SRodney W. Grimes.Sh NAME 364b88c807SRodney W. Grimes.Nm kill 374b88c807SRodney W. Grimes.Nd terminate or signal a process 384b88c807SRodney W. Grimes.Sh SYNOPSIS 39be8b1497SRuslan Ermilov.Nm 40ffcfff94SSteve Price.Op Fl s Ar signal_name 410dc55f76SRuslan Ermilov.Ar pid ... 42be8b1497SRuslan Ermilov.Nm 43ffcfff94SSteve Price.Fl l 44ffcfff94SSteve Price.Op Ar exit_status 45be8b1497SRuslan Ermilov.Nm 46993895acSTim J. Robbins.Fl Ar signal_name 470dc55f76SRuslan Ermilov.Ar pid ... 48be8b1497SRuslan Ermilov.Nm 49993895acSTim J. Robbins.Fl Ar signal_number 500dc55f76SRuslan Ermilov.Ar pid ... 514b88c807SRodney W. Grimes.Sh DESCRIPTION 52ffcfff94SSteve PriceThe 53ffcfff94SSteve Price.Nm 54993895acSTim J. Robbinsutility sends a signal to the processes specified by the 55993895acSTim J. Robbins.Ar pid 560dc55f76SRuslan Ermilovoperands. 574b88c807SRodney W. Grimes.Pp 584b88c807SRodney W. GrimesOnly the super-user may send signals to other users' processes. 594b88c807SRodney W. Grimes.Pp 604b88c807SRodney W. GrimesThe options are as follows: 610dc55f76SRuslan Ermilov.Bl -tag -width indent 62ffcfff94SSteve Price.It Fl s Ar signal_name 63ffcfff94SSteve PriceA symbolic signal name specifying the signal to be sent instead of the 64ffcfff94SSteve Pricedefault 65ffcfff94SSteve Price.Dv TERM . 66ffcfff94SSteve Price.It Fl l Op Ar exit_status 67ffcfff94SSteve PriceIf no operand is given, list the signal names; otherwise, write 68ffcfff94SSteve Pricethe signal name corresponding to 69ffcfff94SSteve Price.Ar exit_status . 70993895acSTim J. Robbins.It Fl Ar signal_name 714b88c807SRodney W. GrimesA symbolic signal name specifying the signal to be sent instead of the 724b88c807SRodney W. Grimesdefault 734b88c807SRodney W. Grimes.Dv TERM . 74993895acSTim J. Robbins.It Fl Ar signal_number 754b88c807SRodney W. GrimesA non-negative decimal integer, specifying the signal to be sent instead 764b88c807SRodney W. Grimesof the default 774b88c807SRodney W. Grimes.Dv TERM . 784b88c807SRodney W. Grimes.El 794b88c807SRodney W. Grimes.Pp 800dc55f76SRuslan ErmilovThe following PIDs have special meanings: 810dc55f76SRuslan Ermilov.Bl -tag -width indent 82f5cf173dSartembunichev.It 0 83f5cf173dSartembunichevThe signal is sent to all processes whose group ID is equal to the process 84f5cf173dSartembunichevgroup ID of the sender, and for which the process has permission. 85ffcfff94SSteve Price.It -1 86ffcfff94SSteve PriceIf superuser, broadcast the signal to all processes; otherwise broadcast 87ffcfff94SSteve Priceto all processes belonging to the user. 88*d6c2d4feSartembunichev.It - Ns Ar PGID 89*d6c2d4feSartembunichevThe signal is sent to all processes that belong to the specified 90*d6c2d4feSartembunichevprocess group ID (PGID). 914b88c807SRodney W. Grimes.El 924b88c807SRodney W. Grimes.Pp 93ffcfff94SSteve PriceSome of the more commonly used signals: 940dc55f76SRuslan Ermilov.Pp 950dc55f76SRuslan Ermilov.Bl -tag -width indent -compact 96ffcfff94SSteve Price.It 1 97ffcfff94SSteve PriceHUP (hang up) 98ffcfff94SSteve Price.It 2 99ffcfff94SSteve PriceINT (interrupt) 100ffcfff94SSteve Price.It 3 101ffcfff94SSteve PriceQUIT (quit) 102ffcfff94SSteve Price.It 6 103ffcfff94SSteve PriceABRT (abort) 104ffcfff94SSteve Price.It 9 105ffcfff94SSteve PriceKILL (non-catchable, non-ignorable kill) 106ffcfff94SSteve Price.It 14 107ffcfff94SSteve PriceALRM (alarm clock) 108ffcfff94SSteve Price.It 15 109ffcfff94SSteve PriceTERM (software termination signal) 110ffcfff94SSteve Price.El 111ffcfff94SSteve Price.Pp 112c644db6aSSheldon HearnSome shells may provide a builtin 11361c9c5ebSPhilippe Charnier.Nm 114e6d3cf26SSheldon Hearncommand which is similar or identical to this utility. 115e6d3cf26SSheldon HearnConsult the 116c644db6aSSheldon Hearn.Xr builtin 1 117c644db6aSSheldon Hearnmanual page. 1186fca4c7cSRuslan Ermilov.Sh EXIT STATUS 1196fca4c7cSRuslan Ermilov.Ex -std 12016a6357cSTim J. Robbins.Sh EXAMPLES 12116a6357cSTim J. RobbinsTerminate 1220dc55f76SRuslan Ermilovthe processes with PIDs 142 and 157: 12316a6357cSTim J. Robbins.Pp 12416a6357cSTim J. Robbins.Dl "kill 142 157" 12516a6357cSTim J. Robbins.Pp 12616a6357cSTim J. RobbinsSend the hangup signal 12716a6357cSTim J. Robbins.Pq Dv SIGHUP 1280dc55f76SRuslan Ermilovto the process with PID 507: 12916a6357cSTim J. Robbins.Pp 13016a6357cSTim J. Robbins.Dl "kill -s HUP 507" 13116a6357cSTim J. Robbins.Pp 1320dc55f76SRuslan ErmilovTerminate the process group with PGID 117: 13316a6357cSTim J. Robbins.Pp 13416a6357cSTim J. Robbins.Dl "kill -- -117" 1354b88c807SRodney W. Grimes.Sh SEE ALSO 136c644db6aSSheldon Hearn.Xr builtin 1 , 1374b88c807SRodney W. Grimes.Xr csh 1 , 1385df3108fSWolfram Schneider.Xr killall 1 , 1394b88c807SRodney W. Grimes.Xr ps 1 , 1400a62a9caSJilles Tjoelker.Xr sh 1 , 1414b88c807SRodney W. Grimes.Xr kill 2 , 142c38eceafSJoseph Koshy.Xr sigaction 2 143ffcfff94SSteve Price.Sh STANDARDS 144ffcfff94SSteve PriceThe 145ffcfff94SSteve Price.Nm 1460dc55f76SRuslan Ermilovutility is expected to be 147ffcfff94SSteve Price.St -p1003.2 148ffcfff94SSteve Pricecompatible. 1494b88c807SRodney W. Grimes.Sh HISTORY 1504b88c807SRodney W. GrimesA 15161c9c5ebSPhilippe Charnier.Nm 1524b88c807SRodney W. Grimescommand appeared in 1535c10b071SSevan Janiyan.At v3 1545c10b071SSevan Janiyanin section 8 of the manual. 1554b88c807SRodney W. Grimes.Sh BUGS 1564b88c807SRodney W. GrimesA replacement for the command 1574b88c807SRodney W. Grimes.Dq Li kill 0 1584b88c807SRodney W. Grimesfor 1594b88c807SRodney W. Grimes.Xr csh 1 1604b88c807SRodney W. Grimesusers should be provided. 161