diff options
author | sjg <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-09-05 20:18:59 +0000 |
commit | 62bb1062226d3ce6a2350808256a25508978352d (patch) | |
tree | 22b131dceb13c3df96da594fbaadb693504797c7 /usr.bin/killall | |
parent | 72ab90509b3a51ab361bf710338f2ef44a4e360d (diff) | |
parent | 04932445481c2cb89ff69a83b961bdef3d64757e (diff) | |
download | FreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.zip FreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.tar.gz |
Merge from head
Diffstat (limited to 'usr.bin/killall')
-rw-r--r-- | usr.bin/killall/killall.1 | 4 | ||||
-rw-r--r-- | usr.bin/killall/killall.c | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/killall/killall.1 b/usr.bin/killall/killall.1 index 7beaadb..be813f7 100644 --- a/usr.bin/killall/killall.1 +++ b/usr.bin/killall/killall.1 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd June 30, 2013 .Dt KILLALL 1 .Os .Sh NAME @@ -110,6 +110,8 @@ the specified Limit potentially matching processes to those matching the specified .Ar procname . +.It Fl q +Suppress error message if no processes are matched. .It Fl z Do not skip zombies. This should not have any effect except to print a few error messages diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index 83e829a..dd22a83 100644 --- a/usr.bin/killall/killall.c +++ b/usr.bin/killall/killall.c @@ -53,7 +53,7 @@ static void __dead2 usage(void) { - fprintf(stderr, "usage: killall [-delmsvz] [-help] [-I] [-j jail]\n"); + fprintf(stderr, "usage: killall [-delmsqvz] [-help] [-I] [-j jail]\n"); fprintf(stderr, " [-u user] [-t tty] [-c cmd] [-SIGNAL] [cmd]...\n"); fprintf(stderr, "At least one option or argument to specify processes must be given.\n"); @@ -101,6 +101,7 @@ main(int ac, char **av) char *user = NULL; char *tty = NULL; char *cmd = NULL; + int qflag = 0; int vflag = 0; int sflag = 0; int dflag = 0; @@ -191,6 +192,9 @@ main(int ac, char **av) errx(1, "must specify procname"); cmd = *av; break; + case 'q': + qflag++; + break; case 'v': vflag++; break; @@ -417,8 +421,9 @@ main(int ac, char **av) } } if (killed == 0) { - fprintf(stderr, "No matching processes %swere found\n", - getuid() != 0 ? "belonging to you " : ""); + if (!qflag) + fprintf(stderr, "No matching processes %swere found\n", + getuid() != 0 ? "belonging to you " : ""); errors = 1; } exit(errors); |