killall.c (1198f21cafc5364ed2dfa55b904af9eb988319b4) | killall.c (a6b474b6c1de12d2b002c0d59a0955179cb6f5e1) |
---|---|
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: --- 343 unchanged lines hidden (view full) --- 352 353 if (vflag || sflag) 354 printf("kill -%s %d\n", upper(sys_signame[sig]), 355 thispid); 356 357 killed++; 358 if (!dflag && !sflag) { 359 if (kill(thispid, sig) < 0 /* && errno != ESRCH */ ) { | 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: --- 343 unchanged lines hidden (view full) --- 352 353 if (vflag || sflag) 354 printf("kill -%s %d\n", upper(sys_signame[sig]), 355 thispid); 356 357 killed++; 358 if (!dflag && !sflag) { 359 if (kill(thispid, sig) < 0 /* && errno != ESRCH */ ) { |
360 warn("kill -%s %d", upper(sys_signame[sig], | 360 warn("kill -%s %d", upper(sys_signame[sig]), |
361 thispid); 362 errors = 1; 363 } 364 } 365 } 366 if (killed == 0) { 367 fprintf(stderr, "No matching processes %swere found\n", 368 getuid() != 0 ? "belonging to you " : ""); 369 errors = 1; 370 } 371 exit(errors); 372} | 361 thispid); 362 errors = 1; 363 } 364 } 365 } 366 if (killed == 0) { 367 fprintf(stderr, "No matching processes %swere found\n", 368 getuid() != 0 ? "belonging to you " : ""); 369 errors = 1; 370 } 371 exit(errors); 372} |