Deleted Added
full compact
killall.c (125013) killall.c (132191)
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>
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 $");
29__FBSDID("$FreeBSD: head/usr.bin/killall/killall.c 132191 2004-07-15 07:26:20Z tjr $");
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>
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#include <locale.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
49
50static void __dead2
51usage(void)
52{
53
54 fprintf(stderr, "usage: killall [-delmsvz] [-help] [-j jid]\n");
55 fprintf(stderr,
56 " [-u user] [-t tty] [-c cmd] [-SIGNAL] [cmd]...\n");

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

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

--- 263 unchanged lines hidden ---