Commit Graph

22 Commits

Author SHA1 Message Date
Jilles Tjoelker
9e7839f632 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
2010-07-29 16:40:45 +00:00
Konstantin Belousov
c67ea27d10 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
2010-02-25 13:53:09 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
Juli Mallett
c83afe7be9 static and const. 2004-03-15 04:10:29 +00:00
Nate Lawson
205bc8633e Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3
Obtained from:	DragonflyBSD
2004-01-28 19:04:14 +00:00
David E. O'Brien
09a80d4867 Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
David E. O'Brien
5eb43ac2f7 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
Tim J. Robbins
08de34ac01 Support the "--" end of options marker, useful to disambiguate between
signal numbers and process groups (negative pid arguments), and
required by SUSv3.
2002-06-13 08:07:20 +00:00
Warner Losh
46251dde8f 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.
2002-02-02 06:48:10 +00:00
Kris Kennaway
961a739a43 Silence WARNS=2 and BDECFLAGS on the i386 and alpha
MFC After:	1 week
2001-05-20 04:52:37 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Philippe Charnier
61c9c5ebee Correct use of .Nm. Add rcsid. 1998-05-13 07:47:35 +00:00
Jonathan Lemon
d623c5c11e Disallow empty arguments (eg: '') as process ids.
PR:		2631
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-08-21 21:34:43 +00:00
Philippe Charnier
749d4bb649 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00
Philippe Charnier
7999ef2f38 Signal # NSIG (32) is invalid.
Obtained from: {Net|Open}BSD
1997-06-03 06:24:50 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard
1130b656e5 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.
1997-01-14 07:20:47 +00:00
Steve Price
ffcfff94d0 Merge Lite2 mods, and -Wall cleaning. 1996-12-14 06:01:00 +00:00
Jordan K. Hubbard
8d0ab00912 Allow 0 as a signal number to match the man page.
Noticed by:	Mike Murphy <mrm@Sceard.COM>
1995-03-05 21:52:41 +00:00
David Greenman
89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Rodney W. Grimes
4b88c807ea BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00