History log of /freebsd-10.3-release/usr.bin/killall/killall.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 274471 13-Nov-2014 smh

MFC r260800:
Fix a regression introduced in r237618

MFC r260801:
Re-work r260800 to include other signals which start with 'I'
such as ILL, INFO etc.

Sponsored by: Multiplay


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 252428 30-Jun-2013 mjg

killall: add -q flag to suppress error message when no processes are matched

Man-page text provided by wblock.

PR: bin/30542
Submitted by: Tony Finch <dot@dotat.at> (original version)
MFC after: 1 week


# 237847 30-Jun-2012 kib

Once in a month, when the moon is full, killall mistakenly considers
living process as a zombie and refuses to kill it. The cause is that
the code masks ki_stat with SZOMB to compare with SZOMB, but ki_stat
is not a mask.

Possibly reported by: cperciva
MFC after: 3 days


# 237846 30-Jun-2012 kib

killall(1) does not use libkvm.

MFC after: 3 days


# 237845 30-Jun-2012 kib

Only initialize array of mibs once.

MFC after: 3 days


# 237844 30-Jun-2012 kib

Initialize procs closer to the place were it is used.
Free can properly handle NULL pointer (but keep free() call on the premise
that the code might be reused).
Show errno when realloc failed.

MFC after: 3 days


# 237618 27-Jun-2012 delphij

Add a -I flag which requests confirmation before action, like what is done
in pkill(1).

MFC after: 2 weeks


# 219347 06-Mar-2011 jilles

Simplify various code that allowed for sys_signame being lower case.

This was changed in r218285.


# 218285 04-Feb-2011 jilles

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


# 200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


# 200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# 194869 24-Jun-2009 jamie

Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by: bz (mentor)


# 192896 27-May-2009 jamie

Add support for the arbitrary named jail parameters used by jail_set(2)
and jail_get(2). Jail(8) can now create jails using a "name=value"
format instead of just specifying a limited set of fixed parameters; it
can also modify parameters of existing jails. Jls(8) can display all
parameters of jails, or a specified set of parameters. The available
parameters are gathered from the kernel, and not hard-coded into these
programs.

Small patches on killall(1) and jexec(8) to support jail names with
jail_get(2).

Approved by: bz (mentor)


# 185074 19-Nov-2008 delphij

Use strlcpy() where appropriate.


# 173502 09-Nov-2007 ru

Fix numerous bugs when parsing options and arguments.


# 132851 29-Jul-2004 maxim

The signal number has to be less than NSIG strictly.

PR: misc/69768
Submitted by: bronek
MFC after: 1 week


# 132193 15-Jul-2004 tjr

Don't pass negative values into <ctype.h> functions on machines
with signed chars.


# 132192 15-Jul-2004 tjr

Print size_t with %zu, not %d.


# 132191 15-Jul-2004 tjr

Respect locale settings from the environment.


# 125013 26-Jan-2004 dds

New -e flag, modifies the behavior of the -u uid flag to use the
effective user id, instead of the real user id.

MFC after: 2 weeks


# 124844 22-Jan-2004 cperciva

Serial murderers shouldn't commit suicide. (killall should
avoid killing itself.)

PR: bin/46107
Submitted by: stacey <stacey_@starwhack.net>


# 124681 18-Jan-2004 maxim

o Sync usage() and man page synopsis with reality.

MFC after: 1 week


# 120500 27-Sep-2003 tjr

Use the 3-component version of the KERN_PROC_PROC sysctl.


# 119834 07-Sep-2003 tjr

Use KERN_PROC_PROC instead of KERN_PROC_ALL when enumerating processes so
that we kill each process once, not once for every thread it owns. This
avoids "No such process" warnings when killing threaded processes.


# 114120 27-Apr-2003 imp

make "killall -j" not core dump.

Submitted by: Joe Marcus Clarke in current@


# 113277 09-Apr-2003 mike

o Add jls(8) for listing active jails.
o Add jexec(8) to execute a command in an existing jail.
o Add -j option for killall(1) to kill all processes in a specified
jail.
o Add -i option to jail(8) to output jail ID of newly created jail.


# 110400 05-Feb-2003 charnier

Header was included twice. Hardcode program name in usage string.


# 99112 30-Jun-2002 obrien

Consistently use FBSDID


# 96976 20-May-2002 dd

Mark a warning as such. Without this, it isn't obvious whether
killall stopped after failing to kill one process or whether it kept
going.


# 94689 14-Apr-2002 des

Skip zombies. Add an option (-z) to revert to the historical behaviour
of trying to kill zombies (which has no effect except emit a few error
messages)


# 93432 30-Mar-2002 dwmalone

Use the method described in the strtol man page to check if it parsed
the entire string. This avoids signed/unsigned comparison.


# 84768 10-Oct-2001 bde

Compensate for "Compensate for header dethreading" by backing it out.


# 78144 12-Jun-2001 obrien

Allow -u to work with UID's also.

Submitted by: Seth Kingsley <seth.kingsley@windriver.com>


# 76678 16-May-2001 phk

Fix an array which was too small.

PR: 27380
Submitted by: Samuel Greear <sgreear@vsni.com>


# 76169 01-May-2001 markm

Compensate for header dethreading.


# 72497 14-Feb-2001 peter

Work around the p_comm[] size limit. If the user supplies more than
16 characters, only check the first 16 since that is all the kernel
records. This isn't ideal, but it is probably the best we can do.
Otherwise, "killall communicator-linux-4.76.bin" will not match
the process as the kernel only records "communicator-lin".


# 71309 21-Jan-2001 ache

Make "killall -t p0" really works.
Old code works only if at least one process name additionly specified.


# 70350 25-Dec-2000 ps

Use the real user ID so non-root users can kill setuid processes
they started.

PR: 23356
Submitted by: Maxim Konovalov <maxim@macomnet.ru>


# 69941 12-Dec-2000 jhb

Catch up to the new kinfo_proc.


# 68628 12-Nov-2000 ps

-U cannot be an option since some signals start with U. -u is the
documented behavior so only check for that.


# 65177 28-Aug-2000 peter

After positive feedback from a few folks, activate a switchover to
using killall.c instead of the perl version that depends on procfs.
The C version uses sysctl(). The program is based on a hack that was
originally written about 6 years ago and has evolved somewhat since then.
(which is why it is a superset of killall.pl, rather than being a clone.)

With apologies to: wosch


# 65127 27-Aug-2000 peter

Try and fix up some bogus indentation leftovers from emacs several
years ago.


# 65126 27-Aug-2000 peter

Sigh, today is not my day. Convert a verbose while() .. loop into a for()
loop.

Submitted by: billf


# 65125 27-Aug-2000 peter

*blush*. I was *sure* I compiled this after the last change..
Add the missing )

Shamed by: billf


# 65123 27-Aug-2000 peter

killall.c is meant to be a superset replacement of killall.pl, the
main difference is that it uses sysctl to get the process lists rather
than /proc - thereby reducing the dependency on /proc by one more tool.