Deleted Added
sdiff udiff text old ( 125013 ) new ( 132191 )
full compact
1/*-
2 * Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
3 * Copyright (c) 2000 Paul Saab <ps@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/usr.bin/killall/killall.c 125013 2004-01-26 11:11:36Z dds $");
30
31#include <sys/param.h>
32#include <sys/jail.h>
33#include <sys/stat.h>
34#include <sys/user.h>
35#include <sys/sysctl.h>
36#include <fcntl.h>
37#include <dirent.h>
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>
41#include <pwd.h>
42#include <signal.h>
43#include <regex.h>
44#include <ctype.h>
45#include <err.h>
46#include <errno.h>
47#include <unistd.h>
48
49static void __dead2
50usage(void)
51{
52
53 fprintf(stderr, "usage: killall [-delmsvz] [-help] [-j jid]\n");
54 fprintf(stderr,
55 " [-u user] [-t tty] [-c cmd] [-SIGNAL] [cmd]...\n");

--- 75 unchanged lines hidden (view full) ---

131 int jid;
132 int mib[4];
133 size_t miblen;
134 int st, nprocs;
135 size_t size;
136 int matched;
137 int killed = 0;
138
139 av++;
140 ac--;
141
142 while (ac > 0) {
143 if (strcmp(*av, "-l") == 0) {
144 printsig(stdout);
145 exit(0);
146 }

--- 263 unchanged lines hidden ---