killall.c (94689) | killall.c (96976) |
---|---|
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 94689 2002-04-14 22:25:57Z des $ | 27 * $FreeBSD: head/usr.bin/killall/killall.c 96976 2002-05-20 07:17:22Z dd $ |
28 */ 29 30#include <sys/cdefs.h> 31#include <sys/param.h> 32#include <sys/stat.h> 33#include <sys/user.h> 34#include <sys/sysctl.h> 35#include <fcntl.h> --- 325 unchanged lines hidden (view full) --- 361 362 if (vflag || sflag) 363 printf("kill -%s %d\n", upper(sys_signame[sig]), 364 thispid); 365 366 killed++; 367 if (!dflag && !sflag) { 368 if (kill(thispid, sig) < 0 /* && errno != ESRCH */ ) { | 28 */ 29 30#include <sys/cdefs.h> 31#include <sys/param.h> 32#include <sys/stat.h> 33#include <sys/user.h> 34#include <sys/sysctl.h> 35#include <fcntl.h> --- 325 unchanged lines hidden (view full) --- 361 362 if (vflag || sflag) 363 printf("kill -%s %d\n", upper(sys_signame[sig]), 364 thispid); 365 366 killed++; 367 if (!dflag && !sflag) { 368 if (kill(thispid, sig) < 0 /* && errno != ESRCH */ ) { |
369 warn("kill -%s %d", upper(sys_signame[sig]), 370 thispid); | 369 warn("warning: kill -%s %d", 370 upper(sys_signame[sig]), thispid); |
371 errors = 1; 372 } 373 } 374 } 375 if (killed == 0) { 376 fprintf(stderr, "No matching processes %swere found\n", 377 getuid() != 0 ? "belonging to you " : ""); 378 errors = 1; 379 } 380 exit(errors); 381} | 371 errors = 1; 372 } 373 } 374 } 375 if (killed == 0) { 376 fprintf(stderr, "No matching processes %swere found\n", 377 getuid() != 0 ? "belonging to you " : ""); 378 errors = 1; 379 } 380 exit(errors); 381} |