getopt returns -1 not EOF
cleanup manpage
This commit is contained in:
parent
5f4e3656d9
commit
a234ba3ffe
18
bin/ps/ps.1
18
bin/ps/ps.1
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ps.1,v 1.18 1997/08/27 05:43:20 mikel Exp $
|
||||
.\" $NetBSD: ps.1,v 1.19 1997/09/14 08:57:37 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -37,10 +37,10 @@
|
||||
.Dt PS 1
|
||||
.Os BSD 4
|
||||
.Sh NAME
|
||||
.Nm \&ps
|
||||
.Nm ps
|
||||
.Nd process status
|
||||
.Sh SYNOPSIS
|
||||
.Nm \&ps
|
||||
.Nm
|
||||
.Op Fl acCehjlmrSTuvwx
|
||||
.Op Fl M Ar core
|
||||
.Op Fl N Ar system
|
||||
@ -49,10 +49,10 @@
|
||||
.Op Fl p Ar pid
|
||||
.Op Fl t Ar tty
|
||||
.Op Fl W Ar swap
|
||||
.Nm ps
|
||||
.Nm
|
||||
.Op Fl L
|
||||
.Sh DESCRIPTION
|
||||
.Nm \&Ps
|
||||
.Nm
|
||||
displays a header line followed by lines containing information about your
|
||||
processes that have controlling terminals.
|
||||
This information is sorted by process
|
||||
@ -165,7 +165,7 @@ is your window size.
|
||||
If the
|
||||
.Fl w
|
||||
option is specified more than once,
|
||||
.Nm \&ps
|
||||
.Nm
|
||||
will use as many columns as necessary without regard for your window size.
|
||||
.It Fl x
|
||||
Display information about processes without controlling terminals.
|
||||
@ -179,7 +179,7 @@ The cpu utilization of the process; this is a decaying average over up to
|
||||
a minute of previous (real) time.
|
||||
Since the time base over which this is computed varies (since processes may
|
||||
be very young) it is possible for the sum of all
|
||||
.Tn \&%CPU
|
||||
.Tn %CPU
|
||||
fields to exceed 100%.
|
||||
.It %mem
|
||||
The percentage of real memory used by this process.
|
||||
@ -319,7 +319,7 @@ When printing using the command keyword, a process that has exited and
|
||||
has a parent that has not yet waited for the process (in other words, a zombie)
|
||||
is listed as ``<defunct>'', and a process which is blocked while trying
|
||||
to exit is listed as ``<exiting>''.
|
||||
.Nm \&Ps
|
||||
.Nm
|
||||
makes an educated guess as to the file name and arguments given when the
|
||||
process was created by examining memory or the swap area.
|
||||
The method is inherently somewhat unreliable and in any event a process
|
||||
@ -495,6 +495,6 @@ default system namelist
|
||||
.Xr pstat 8
|
||||
.Sh BUGS
|
||||
Since
|
||||
.Nm \&ps
|
||||
.Nm
|
||||
cannot run faster than the system and is run as any other scheduled
|
||||
process, the information it displays can never be exact.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ps.c,v 1.19 1997/07/20 20:37:57 christos Exp $ */
|
||||
/* $NetBSD: ps.c,v 1.20 1997/09/14 08:57:38 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ps.c,v 1.19 1997/07/20 20:37:57 christos Exp $");
|
||||
__RCSID("$NetBSD: ps.c,v 1.20 1997/09/14 08:57:38 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -137,7 +137,7 @@ main(argc, argv)
|
||||
ttydev = NODEV;
|
||||
memf = nlistf = swapf = NULL;
|
||||
while ((ch = getopt(argc, argv,
|
||||
"acCeghjLlM:mN:O:o:p:rSTt:uvW:wx")) != EOF)
|
||||
"acCeghjLlM:mN:O:o:p:rSTt:uvW:wx")) != -1)
|
||||
switch((char)ch) {
|
||||
case 'a':
|
||||
all = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user