{"id":331,"date":"2019-10-21T19:47:55","date_gmt":"2019-10-21T17:47:55","guid":{"rendered":"http:\/\/linuxboxen2.dk\/?p=331"},"modified":"2019-10-21T19:47:55","modified_gmt":"2019-10-21T17:47:55","slug":"org_kill","status":"publish","type":"post","link":"https:\/\/www.linuxboxen.dk\/?p=331","title":{"rendered":"KILL"},"content":{"rendered":"<p>KILL(1)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 User Commands\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 KILL(1)<\/p>\n<p>NAME<\/p>\n<p>kill &#8211; terminate a process<\/p>\n<p>SYNOPSIS<\/p>\n<p>kill [-signal|-s signal|-p] [-q value] [-a] [&#8211;] pid|name&#8230;<br \/>\nkill -l [number] | -L<\/p>\n<p>DESCRIPTION<\/p>\n<p>The command kill sends the specified signal to the specified<br \/>\nprocesses or process groups.\u00a0 If no signal is specified, the TERM<br \/>\nsignal is sent.\u00a0 This TERM signal will kill processes that do not<br \/>\ncatch it; for other processes it may be necessary to use the KILL<br \/>\nsignal (number 9), since this signal cannot be caught.<\/p>\n<p>Most modern shells have a builtin kill function, with a usage rather<br \/>\nsimilar to that of the command described here.\u00a0 The &#8211;all, &#8211;pid, and<br \/>\n&#8211;queue options, and the possibility to specify processes by command<br \/>\nname, are local extensions.<\/p>\n<p>If signal is 0, then no actual signal is sent, but error checking is<br \/>\nstill performed.<\/p>\n<p>ARGUMENTS<\/p>\n<p>The list of processes to be signaled can be a mixture of names and<br \/>\npids.<\/p>\n<p>pid\u00a0\u00a0\u00a0 Each pid can be one of four things:<\/p>\n<p>n\u00a0\u00a0\u00a0\u00a0\u00a0 where n is larger than 0.\u00a0 The process with pid n is<br \/>\nsignaled.<\/p>\n<p>0\u00a0\u00a0\u00a0\u00a0\u00a0 All processes in the current process group are<br \/>\nsignaled.<\/p>\n<p>-1\u00a0\u00a0\u00a0\u00a0 All processes with a pid larger than 1 are signaled.<\/p>\n<p>-n\u00a0\u00a0\u00a0\u00a0 where n is larger than 1.\u00a0 All processes in process<br \/>\ngroup n are signaled.\u00a0 When an argument of the form<br \/>\n&#8216;-n&#8217; is given, and it is meant to denote a process<br \/>\ngroup, either a signal must be specified first, or the<br \/>\nargument must be preceded by a &#8216;&#8211;&#8216; option, otherwise<br \/>\nit will be taken as the signal to send.<\/p>\n<p>name\u00a0\u00a0 All processes invoked using this name will be signaled.<\/p>\n<p>OPTIONS<\/p>\n<p>-s, &#8211;signal signal<br \/>\nThe signal to send.\u00a0 It may be given as a name or a number.<\/p>\n<p>-l, &#8211;list [number]<br \/>\nPrint a list of signal names, or convert the given signal<br \/>\nnumber to a name.\u00a0 The signals can be found in \/usr\/include\/<br \/>\nlinux\/signal.h<\/p>\n<p>-L, &#8211;table<br \/>\nSimilar to -l, but it will print signal names and their<br \/>\ncorresponding numbers.<\/p>\n<p>-a, &#8211;all<br \/>\nDo not restrict the commandname-to-pid conversion to processes<br \/>\nwith the same uid as the present process.<\/p>\n<p>-p, &#8211;pid<br \/>\nOnly print the process id (pid) of the named processes, do not<br \/>\nsend any signals.<\/p>\n<p>The &#8211;pid option is automatically enabled when the kill<br \/>\ncommand is invoked with the name of pid.\u00a0 This functionality<br \/>\nis deprecated, and will be removed in March 2016.<\/p>\n<p>-q, &#8211;queue value<br \/>\nUse sigqueue(2) rather than kill(2).\u00a0 The value argument is an<br \/>\ninteger that is sent along with the signal.\u00a0 If the receiving<br \/>\nprocess has installed a handler for this signal using the<br \/>\nSA_SIGINFO flag to sigaction(2), then it can obtain this data<br \/>\nvia the si_sigval field of the siginfo_t structure.<\/p>\n<p>NOTES<\/p>\n<p>It is not possible to send a signal to an explicitly selected thread<br \/>\nin a multithreaded process using the kill(2) syscall.\u00a0 If kill(2) is<br \/>\nused to send a signal to a thread group, then the kernel selects an<br \/>\narbitrary member of the thread group that has not blocked the signal.<br \/>\nFor more details see clone(2), the CLONE_THREAD description.<\/p>\n<p>The command kill(1) as well as syscall kill(2) accept a TID (thread<br \/>\nID, see gettid(2)) as an argument.\u00a0 In this case the kill behavior is<br \/>\nnot changed and the signal is also delivered to the thread group<br \/>\nrather than to the specified thread.<\/p>\n<p>RETURN CODES<\/p>\n<p>kill has the following return codes:<\/p>\n<p>0\u00a0\u00a0\u00a0\u00a0\u00a0 success<\/p>\n<p>1\u00a0\u00a0\u00a0\u00a0\u00a0 failure<\/p>\n<p>64\u00a0\u00a0\u00a0\u00a0 partial success (when more than one process specified)<\/p>\n<p>SEE ALSO<\/p>\n<p>bash(1), tcsh(1), kill(2), sigvec(2), signal(7)<\/p>\n<p>AUTHORS<\/p>\n<p>Salvatore Valente \u27e8svalente@mit.edu\u27e9<br \/>\nKarel Zak \u27e8kzak@redhat.com\u27e9<\/p>\n<p>The original version was taken from BSD 4.4.<\/p>\n<p>AVAILABILITY<\/p>\n<p>The kill command is part of the util-linux package and is available<br \/>\nfrom Linux Kernel Archive<br \/>\n\u27e8ftp:\/\/ftp.kernel.org\/pub\/linux\/utils\/util-linux\/\u27e9.<\/p>\n<p>COLOPHON<\/p>\n<p>This page is part of the util-linux (a random collection of Linux<br \/>\nutilities) project.\u00a0 Information about the project can be found at<br \/>\n\u27e8https:\/\/www.kernel.org\/pub\/linux\/utils\/util-linux\/\u27e9.\u00a0 If you have a<br \/>\nbug report for this manual page, send it to<br \/>\nutil-linux@vger.kernel.org.\u00a0 This page was obtained from the<br \/>\nproject&#8217;s upstream Git repository<br \/>\n(git:\/\/git.kernel.org\/pub\/scm\/utils\/util-linux\/util-linux.git) on<br \/>\n2014-12-30.\u00a0 If you discover any rendering problems in this HTML ver\u2010<br \/>\nsion of the page, or you believe there is a better or more up-to-date<br \/>\nsource for the page, or you have corrections or improvements to the<br \/>\ninformation in this COLOPHON (which is not part of the original man\u2010<br \/>\nual page), send a mail to\u00a0man-pages@man7.org<\/p>\n<p>util-linux\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 July 2014\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 KILL(1)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>KILL(1)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 User Commands\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 KILL(1) NAME kill &#8211; terminate a process SYNOPSIS kill [-signal|-s signal|-p] [-q value] [-a] [&#8211;] pid|name&#8230; kill -l [number] | -L DESCRIPTION The command kill sends the specified signal to the specified processes or process groups.\u00a0 If no signal is specified, the TERM signal is sent.\u00a0 This TERM signal will kill processes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-shell"],"a3_pvc":{"activated":false,"total_views":0,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}