History log of /freebsd-current/bin/kill/kill.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# 90aea514 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# e9746806 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 27ca6260 05-Mar-2017 Bryan Drewery <bdrewery@FreeBSD.org>

Don't kill pid -1 on overflow from strtol(3).

Store the result in a proper long and then compare to the proper pid_t
for overflow, so that no MD assumptions are made.

Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9887


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 22ea47ec 01-Mar-2015 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix compiler warnings related to duplicate or missing declarations.


# 76961687 15-Mar-2014 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Allow kill %job on jobs started without job control.

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.


# 4646e82d 08-Mar-2014 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Successfully do nothing when killing a terminated job.

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.


# cdbf4fee 28-Apr-2013 Eitan Adler <eadler@FreeBSD.org>

Remove cast that was only required for K&R C.

Reviewed by: jilles


# 3658c977 01-Mar-2011 Jilles Tjoelker <jilles@FreeBSD.org>

kill: Note that this is used both as a normal program and a shell builtin.


# 12dacf62 04-Feb-2011 Jilles Tjoelker <jilles@FreeBSD.org>

Make sys_signame upper case.

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'.


# 0a62a9ca 21-Dec-2010 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Add kill builtin.

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


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 9e7839f6 29-Jul-2010 Jilles Tjoelker <jilles@FreeBSD.org>

kill: Stop processing if a syntactically invalid pid is encountered.

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


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# a6179399 04-Mar-2010 Konstantin Belousov <kib@FreeBSD.org>

MFC r204308:
Do not restrict the allowed signals that can be specified by number
to the list of signals that has symbolic name. It was impossible to
send rt signals with kill(1) due to the check.


# c67ea27d 25-Feb-2010 Konstantin Belousov <kib@FreeBSD.org>

Do not restrict the allowed signals that can be specified by number
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


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 9ddb49cb 10-Jan-2005 Warner Losh <imp@FreeBSD.org>

/*- or .\"- or #- to begin license clauses.


# 6195fb41 06-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


# c83afe7b 14-Mar-2004 Juli Mallett <jmallett@FreeBSD.org>

static and const.


# 205bc863 28-Jan-2004 Nate Lawson <njl@FreeBSD.org>

Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3

Obtained from: DragonflyBSD


# 09a80d48 01-May-2003 David E. O'Brien <obrien@FreeBSD.org>

Quiet warnings about copyright[].


# 5eb43ac2 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use __FBSDID


# 08de34ac 13-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Support the "--" end of options marker, useful to disambiguate between
signal numbers and process groups (negative pid arguments), and
required by SUSv3.


# 46251dde 01-Feb-2002 Warner Losh <imp@FreeBSD.org>

o __P has been reoved
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.


# 961a739a 19-May-2001 Kris Kennaway <kris@FreeBSD.org>

Silence WARNS=2 and BDECFLAGS on the i386 and alpha

MFC After: 1 week


# 2a456239 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 61c9c5eb 13-May-1998 Philippe Charnier <charnier@FreeBSD.org>

Correct use of .Nm. Add rcsid.


# d623c5c1 21-Aug-1997 Jonathan Lemon <jlemon@FreeBSD.org>

Disallow empty arguments (eg: '') as process ids.
PR: 2631
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>


# c4694019 01-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Import Lite2's src/bin. All files in src/bin are off the vendor branch,
so this doesn't change the active versions.


# 749d4bb6 06-Jun-1997 Philippe Charnier <charnier@FreeBSD.org>

Cosmetic change in usage string.


# 7999ef2f 03-Jun-1997 Philippe Charnier <charnier@FreeBSD.org>

Signal # NSIG (32) is invalid.
Obtained from: {Net|Open}BSD


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

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.


# ffcfff94 13-Dec-1996 Steve Price <steve@FreeBSD.org>

Merge Lite2 mods, and -Wall cleaning.


# 8d0ab009 05-Mar-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Allow 0 as a signal number to match the man page.
Noticed by: Mike Murphy <mrm@Sceard.COM>


# 89730b29 23-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# 4b88c807 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite bin Sources