aboutsummaryrefslogtreecommitdiff
path: root/bin/kill/kill.c
Commit message (Collapse)AuthorAgeFilesLines
* sh: Fix compiler warnings related to duplicate or missing declarations.Jilles Tjoelker2015-03-011-1/+0
| | | | Notes: svn path=/head/; revision=279503
* sh: Allow kill %job on jobs started without job control.Jilles Tjoelker2014-03-151-11/+6
| | | | | | | | | | | When killing a %job started without job control, kill all processes in it. As with process groups and zombies, if any process in the job can be killed or has already terminated, the command is successful. This also fixes occasional failures of the builtins/kill1.0 test. Notes: svn path=/head/; revision=263206
* sh: Successfully do nothing when killing a terminated job.Jilles Tjoelker2014-03-081-2/+8
| | | | | | | | | If a job has terminated but is still known, silently do nothing when using the kill builtin with the job specifier. Formerly, the shell called kill() with the process group ID that might have been reused. Notes: svn path=/head/; revision=262931
* Remove cast that was only required for K&R C.Eitan Adler2013-04-281-1/+1
| | | | | | | Reviewed by: jilles Notes: svn path=/head/; revision=250035
* kill: Note that this is used both as a normal program and a shell builtin.Jilles Tjoelker2011-03-011-0/+4
| | | | Notes: svn path=/head/; revision=219154
* Make sys_signame upper case.Jilles Tjoelker2011-02-041-1/+1
| | | | | | | | | | | | | | | This matches the constants from <signal.h> with 'SIG' removed, which POSIX requires kill and trap to accept and 'kill -l' to write. 'kill -l', 'trap', 'trap -l' output is now upper case. In Turkish locales, signal names with an upper case 'I' are now accepted, while signal names with a lower case 'i' are no longer accepted, and the output of 'killall -l' now contains proper capital 'I' without dot instead of a dotted capital 'I'. Notes: svn path=/head/; revision=218285
* sh: Add kill builtin.Jilles Tjoelker2010-12-211-11/+32
| | | | | | | | | | | | | | | | | | | | This allows specifying a %job (which is equivalent to the corresponding process group). Additionally, it improves reliability of kill from sh in high-load situations and ensures "kill" finds the correct utility regardless of PATH, as required by POSIX (unless the undocumented %builtin mechanism is used). Side effect: fatal errors (any error other than kill(2) failure) now return exit status 2 instead of 1. (This is consistent with other sh builtins, but not in NetBSD.) Code size increases about 1K on i386. Obtained from: NetBSD Notes: svn path=/head/; revision=216629
* kill: Stop processing if a syntactically invalid pid is encountered.Jilles Tjoelker2010-07-291-4/+3
| | | | | | | | | | | | | | | So a command like kill _HUP 1 now fails without sending SIGTERM to init. The behaviour when kill(2) fails remains unchanged: processing continues. This matches other implementations and POSIX and is useful for killing multiple processes at once when some of them may already be gone. PR: bin/40282 Notes: svn path=/head/; revision=210613
* Do not restrict the allowed signals that can be specified by numberKonstantin Belousov2010-02-251-1/+1
| | | | | | | | | | to the list of signals that has symbolic name. It was impossible to send rt signals with kill(1) due to the check. MFC after: 1 week Notes: svn path=/head/; revision=204308
* /*- or .\"- or #- to begin license clauses.Warner Losh2005-01-101-1/+1
| | | | Notes: svn path=/head/; revision=139969
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-061-4/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* static and const.Juli Mallett2004-03-151-10/+10
| | | | Notes: svn path=/head/; revision=127005
* Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3Nate Lawson2004-01-281-5/+5
| | | | | | | Obtained from: DragonflyBSD Notes: svn path=/head/; revision=125156
* Quiet warnings about copyright[].David E. O'Brien2003-05-011-2/+2
| | | | Notes: svn path=/head/; revision=114433
* Consistently use __FBSDIDDavid E. O'Brien2002-06-301-2/+2
| | | | Notes: svn path=/head/; revision=99109
* Support the "--" end of options marker, useful to disambiguate betweenTim J. Robbins2002-06-131-1/+4
| | | | | | | | signal numbers and process groups (negative pid arguments), and required by SUSv3. Notes: svn path=/head/; revision=98158
* o __P has been reovedWarner Losh2002-02-021-15/+9
| | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Notes: svn path=/head/; revision=90110
* Silence WARNS=2 and BDECFLAGS on the i386 and alphaKris Kennaway2001-05-201-1/+2
| | | | | | | MFC After: 1 week Notes: svn path=/head/; revision=76876
* $Id$ -> $FreeBSD$Peter Wemm1999-08-271-1/+1
| | | | Notes: svn path=/head/; revision=50471
* Correct use of .Nm. Add rcsid.Philippe Charnier1998-05-131-3/+5
| | | | Notes: svn path=/head/; revision=36012
* Disallow empty arguments (eg: '') as process ids.Jonathan Lemon1997-08-211-4/+4
| | | | | | | | PR: 2631 Submitted by: Arne Henrik Juul <arnej@imf.unit.no> Notes: svn path=/head/; revision=28554
* Cosmetic change in usage string.Philippe Charnier1997-06-061-5/+6
| | | | Notes: svn path=/head/; revision=26465
* Signal # NSIG (32) is invalid.Philippe Charnier1997-06-031-2/+2
| | | | | | | Obtained from: {Net|Open}BSD Notes: svn path=/head/; revision=26404
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22988
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Merge Lite2 mods, and -Wall cleaning.Steve Price1996-12-141-29/+71
| | | | Notes: svn path=/head/; revision=20416
* Allow 0 as a signal number to match the man page.Jordan K. Hubbard1995-03-051-2/+2
| | | | | | | Noticed by: Mike Murphy <mrm@Sceard.COM> Notes: svn path=/head/; revision=6908
* Added $Id$David Greenman1994-09-241-0/+2
| | | | Notes: svn path=/head/; revision=3044
* BSD 4.4 Lite bin SourcesRodney W. Grimes1994-05-261-0/+144
Notes: svn path=/head/; revision=1556