summaryrefslogtreecommitdiffstats
path: root/usr.bin/killall/killall.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-08-28 22:09:38 +0000
committerpeter <peter@FreeBSD.org>2000-08-28 22:09:38 +0000
commitf47bf1f4e6a3f541e2923ccc99ff4e21f9b60094 (patch)
tree02dd9c0e6ee759daeb9ab24159dcf85b4b844363 /usr.bin/killall/killall.c
parentdd8b44b3958fa67d802cbbec7c7d82f7fb476229 (diff)
downloadFreeBSD-src-f47bf1f4e6a3f541e2923ccc99ff4e21f9b60094.zip
FreeBSD-src-f47bf1f4e6a3f541e2923ccc99ff4e21f9b60094.tar.gz
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
Diffstat (limited to 'usr.bin/killall/killall.c')
-rw-r--r--usr.bin/killall/killall.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c
index 0cf417d..12de0c8 100644
--- a/usr.bin/killall/killall.c
+++ b/usr.bin/killall/killall.c
@@ -27,6 +27,7 @@
* $FreeBSD$
*/
+#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/user.h>
@@ -46,7 +47,7 @@
static char *prog;
-static void
+static void __dead2
usage(void)
{
@@ -138,6 +139,8 @@ main(int ac, char **av)
printsig(stdout);
exit(0);
}
+ if (strcmp(*av, "-help") == 0)
+ usage();
if (**av == '-') {
++*av;
switch (**av) {
OpenPOWER on IntegriCloud