killall.c (65126) | killall.c (65127) |
---|---|
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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/usr.bin/killall/killall.c 65126 2000-08-27 01:17:11Z peter $ | 27 * $FreeBSD: head/usr.bin/killall/killall.c 65127 2000-08-27 02:12:29Z peter $ |
28 */ 29 30#include <sys/param.h> 31#include <sys/stat.h> 32#include <sys/user.h> 33#include <sys/sysctl.h> 34#include <fcntl.h> 35#include <dirent.h> --- 59 unchanged lines hidden (view full) --- 95 exit(1); 96} 97 98int 99main(int ac, char **av) 100{ 101 struct kinfo_proc *procs = NULL, *newprocs; 102 struct stat sb; | 28 */ 29 30#include <sys/param.h> 31#include <sys/stat.h> 32#include <sys/user.h> 33#include <sys/sysctl.h> 34#include <fcntl.h> 35#include <dirent.h> --- 59 unchanged lines hidden (view full) --- 95 exit(1); 96} 97 98int 99main(int ac, char **av) 100{ 101 struct kinfo_proc *procs = NULL, *newprocs; 102 struct stat sb; |
103 struct passwd *pw; | 103 struct passwd *pw; |
104 regex_t rgx; 105 regmatch_t pmatch; 106 int i, j; 107 char buf[256]; 108 char *user = NULL; 109 char *tty = NULL; 110 char *cmd = NULL; 111 int vflag = 0; 112 int sflag = 0; 113 int dflag = 0; 114 int mflag = 0; 115 uid_t uid = 0; 116 dev_t tdev = 0; 117 char thiscmd[MAXCOMLEN + 1]; 118 pid_t thispid; 119 uid_t thisuid; 120 dev_t thistdev; 121 int sig = SIGTERM; | 104 regex_t rgx; 105 regmatch_t pmatch; 106 int i, j; 107 char buf[256]; 108 char *user = NULL; 109 char *tty = NULL; 110 char *cmd = NULL; 111 int vflag = 0; 112 int sflag = 0; 113 int dflag = 0; 114 int mflag = 0; 115 uid_t uid = 0; 116 dev_t tdev = 0; 117 char thiscmd[MAXCOMLEN + 1]; 118 pid_t thispid; 119 uid_t thisuid; 120 dev_t thistdev; 121 int sig = SIGTERM; |
122 const char *const * p; | 122 const char *const *p; |
123 char *ep; 124 int errors = 0; 125 int mib[3]; 126 size_t miblen; 127 int st, nprocs; 128 size_t size; 129 int matched; 130 int killed = 0; --- 239 unchanged lines hidden --- | 123 char *ep; 124 int errors = 0; 125 int mib[3]; 126 size_t miblen; 127 int st, nprocs; 128 size_t size; 129 int matched; 130 int killed = 0; --- 239 unchanged lines hidden --- |