[Midnightbsd-cvs] src: usr.bin/killall: sync with freebsd 7
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Mar 27 18:23:48 EDT 2009
Log Message:
-----------
sync with freebsd 7
Modified Files:
--------------
src/usr.bin/killall:
killall.1 (r1.1.1.1 -> r1.2)
killall.c (r1.1.1.1 -> r1.2)
-------------- next part --------------
Index: killall.c
===================================================================
RCS file: /home/cvs/src/usr.bin/killall/killall.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L usr.bin/killall/killall.c -L usr.bin/killall/killall.c -u -r1.1.1.1 -r1.2
--- usr.bin/killall/killall.c
+++ usr.bin/killall/killall.c
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/killall/killall.c,v 1.31 2004/07/29 18:36:35 maxim Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/killall/killall.c,v 1.31.18.1 2007/11/14 19:18:40 ru Exp $");
#include <sys/param.h>
#include <sys/jail.h>
@@ -154,11 +154,12 @@
switch (**av) {
case 'j':
++*av;
- if (**av == '\0')
+ if (**av == '\0') {
++av;
- --ac;
+ --ac;
+ }
jflag++;
- if (!*av)
+ if (*av == NULL)
errx(1, "must specify jid");
jid = strtol(*av, &ep, 10);
if (!*av || *ep)
@@ -168,23 +169,32 @@
break;
case 'u':
++*av;
- if (**av == '\0')
+ if (**av == '\0') {
++av;
- --ac;
+ --ac;
+ }
+ if (*av == NULL)
+ errx(1, "must specify user");
user = *av;
break;
case 't':
++*av;
- if (**av == '\0')
+ if (**av == '\0') {
++av;
- --ac;
+ --ac;
+ }
+ if (*av == NULL)
+ errx(1, "must specify tty");
tty = *av;
break;
case 'c':
++*av;
- if (**av == '\0')
+ if (**av == '\0') {
++av;
- --ac;
+ --ac;
+ }
+ if (*av == NULL)
+ errx(1, "must specify procname");
cmd = *av;
break;
case 'v':
Index: killall.1
===================================================================
RCS file: /home/cvs/src/usr.bin/killall/killall.1,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L usr.bin/killall/killall.1 -L usr.bin/killall/killall.1 -u -r1.1.1.1 -r1.2
--- usr.bin/killall/killall.1
+++ usr.bin/killall/killall.1
@@ -22,9 +22,9 @@
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/usr.bin/killall/killall.1,v 1.34 2005/01/17 07:44:20 ru Exp $
+.\" $FreeBSD: src/usr.bin/killall/killall.1,v 1.34.10.1 2007/11/14 19:22:42 ru Exp $
.\"
-.Dd January 26, 2004
+.Dd November 9, 2007
.Os
.Dt KILLALL 1
.Sh NAME
@@ -38,12 +38,12 @@
.Op Fl u Ar user
.Op Fl t Ar tty
.Op Fl c Ar procname
-.Op Fl SIGNAL
+.Op Fl Ar SIGNAL
.Op Ar procname ...
.Sh DESCRIPTION
The
.Nm
-utility kills processes selected by name, as opposed to the selection by pid
+utility kills processes selected by name, as opposed to the selection by PID
as done by
.Xr kill 1 .
By default, it will send a
@@ -56,7 +56,7 @@
The super-user is allowed to kill any process.
.Pp
The options are as follows:
-.Bl -tag -width 10n -offset indent
+.Bl -tag -width ".Fl c Ar procname"
.It Fl d | v
Be more verbose about what will be done.
For a single
@@ -84,12 +84,12 @@
running under the real UID of the caller.
.It Fl s
Show only what would be done, but do not send any signal.
-.It Fl SIGNAL
+.It Fl Ar SIGNAL
Send a different signal instead of the default
.Dv TERM .
The signal may be specified either as a name
(with or without a leading
-.Dv SIG ) ,
+.Dq Li SIG ) ,
or numerically.
.It Fl j Ar jid
Kill processes in the jail specified by
@@ -103,11 +103,7 @@
the specified
.Ar tty .
.It Fl c Ar procname
-When used with the
-.Fl u
-or
-.Fl t
-flags, limit potentially matching processes to those matching
+Limit potentially matching processes to those matching
the specified
.Ar procname .
.It Fl z
@@ -116,23 +112,21 @@
if there are zombie processes that match the specified pattern.
.El
.Sh ALL PROCESSES
-Sending a signal to all processes with uid
-.Em XYZ
+Sending a signal to all processes with the given UID
is already supported by
.Xr kill 1 .
So use
.Xr kill 1
-for this job (e.g.\& $ kill -TERM -1 or
-as root $ echo kill -TERM -1 | su -m <user>)
+for this job (e.g.\&
+.Dq Li "kill -TERM -1
+or as root
+.Dq Li "echo kill -TERM -1 | su -m <user>" ) .
.Sh EXIT STATUS
The
.Nm
-command will respond with a short usage message and exit with a status
-of 2 in case of a command error.
-A status of 1 will be returned if
-either no matching process has been found or not all processes have
-been signalled successfully.
-Otherwise, a status of 0 will be
+utility exits 0 if some processes have been found and
+signalled successfully.
+Otherwise, a status of 1 will be
returned.
.Sh DIAGNOSTICS
Diagnostic messages will only be printed if requested by
More information about the Midnightbsd-cvs
mailing list