| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, an alias keyword is resolved once and for all by
merging specifications of the keyword (or chain of keywords) it points
to. This merge in particular determines the final attributes of the
alias keyword, as well as the final keyword it points to, which uniquely
determines which information is printed (all non-alias keywords are
assumed to display different data).
Also, the alias resolving code has been moved into the resolve_alias()
function and helpers (e.g., merge_alias()). Aliases are still resolved
lazily as needed by default. The new top-level resolve_aliases()
function is used to resolve them at once at program startup if ps(1) has
been compiled with PS_CHECK_KEYWORDS defined. Else, it can also be
called directly from a debugger.
This is in preparation for removing columns that actually display the
same information in a subsequent commit, as this requires being able to
(quickly) determine if they are aliases to each other.
***
The merge process is now explicit and more flexible. Previously, all
fields of the resolved keyword were unconditionally used for the alias
(the pointer to an alias keyword structure was replaced by one to the
aliased keyword's one). Now, field 'final_kw' on the alias keyword will
store a pointer to the aliased keyword structure (and not only its name,
as a subsequent commit will need the structure address). Fields
'header', 'field' and 'flag' are taken from the aliased keyword if they
have default values (NULL or 0), else the alias' values prevail. This
allows an alias to override one or more of these fields. All fields
after 'oproc', because they describe the information to display
consistently with each other, are always taken from the aliased keyword.
merge_alias() checks that the values of these fields in the alias
keyword structure are unspecified (NULL, or some neutral value like
0 and UNSPEC).
While here, parsefmt() was reworked to avoid any direct recursion and
the break-up/recombination steps that were used when processing aliases.
The latter was due to the mutual recursion with findvar() and its
odd-for-that-purpose signature. findvar() has been removed in the
process. Simplification of parsefmt() also allows to be more precise
with the errors reported (in particular, the case of an empty keyword
with a specific header would just be reported as a "keyword not found"
message).
While here, introduce the check_keywords() function, performing sanity
checks on the declared keywords, currently only validating that they are
declared in alphabetical order. As for resolve_aliases(), this function
is called at startup on PS_CHECK_KEYWORDS, else it is available to be
called from a debugger.
Ideally, alias resolution should be done at compile time. In practice,
it seems doing so at runtime was never a problem (there are only a few
aliases compared to all available keywords, and there's currently at
most one level of aliasing). With the changes here, it seems very
unlikely to become one even if many more keywords, aliases or aliasing
levels are added.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The process flag P_INMEM is always set. Eliminate all checks for the
bit. Also eliminate LAZY_PS define and code covered by it: we do not
have an u-area for long time, and it cannot be swapped out.
Also eliminate setting controlled by the '-f' switch, but accept it for
backward compatibility.
The 'W' process secondary state (swapped out) is impossible, stop
calculating it.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D47492
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
|
|
|
|
|
|
|
| |
Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate
package, which requires pre-install/post-install scripts, to be
added later.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=295439
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove overlinking in lib/libxo/tests, sbin/savecore, and
usr.bin/{iscsictl,wc,xo}
PR: 203673
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=289490
|
| |
|
|
|
|
|
|
|
|
| |
Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117
Obtained from: https://github.com/Juniper/libxo
Notes:
svn path=/head/; revision=287111
|
| |
|
|
|
|
|
|
| |
Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.
Notes:
svn path=/head/; revision=283304
|
| |
|
|
|
|
|
| |
static
Notes:
svn path=/head/; revision=275028
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
-J 0 can be used to show only host processes.
Patch partially based on work by bz@
PR: bin/78763
MFC after: 2 weeks
Relnotes: yes
Notes:
svn path=/head/; revision=265229
|
| |
|
|
|
|
|
| |
so use default WARNS level from bin/Makefile.inc
Notes:
svn path=/head/; revision=140903
|
| |
|
|
| |
Notes:
svn path=/head/; revision=137670
|
| |
|
|
|
|
|
| |
Use WARNS?= instead of WARNS=
Notes:
svn path=/head/; revision=126173
|
| |
|
|
|
|
|
|
|
|
| |
Obsolete WFORMAT= junk also removed where possible.
OK'ed by: obrien
Tested on: sparc64, alpha, i386
Notes:
svn path=/head/; revision=116282
|
| |
|
|
|
|
|
| |
to properly fix.
Notes:
svn path=/head/; revision=114483
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the LOMAC-specific interface (which is being deprecated). The
revised LOMAC using the MAC framework will export levels listable
using this mechanism.
Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=105831
|
| |
|
|
| |
Notes:
svn path=/head/; revision=99592
|
| |
|
|
| |
Notes:
svn path=/head/; revision=97972
|
| |
|
|
| |
Notes:
svn path=/head/; revision=90167
|
| |
|
|
|
|
|
| |
Tested on i386 and alpha.
Notes:
svn path=/head/; revision=90166
|
| |
|
|
|
|
|
| |
cleanup courtesy of automatic checking (lint).
Notes:
svn path=/head/; revision=90143
|
| |
|
|
|
|
|
|
|
| |
set WARNS=0.
Reviewed by: mike
Notes:
svn path=/head/; revision=87323
|
| |
|
|
|
|
|
|
|
| |
in ls(1) and ps(1).
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=86922
|
| |
|
|
| |
Notes:
svn path=/head/; revision=76812
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turn off setgid-kmem for /bin/ps, it's now quite functional without it.
ps no longer needs /dev/*mem or /proc. (It will still use some /proc
files if they are available for -e, but it's not required, so it'll
happily run in a jail or chroot).
The proc stats are now part of eproc (obtained via sysctl) and no longer
needs to beat up the u-page reading code and the problems with that.
This also has the side effect of disabling 'ps -e' for normal users
*EXCEPT* when looking at their own processes. ie: they can see
environments in processes with their uid, enforced by the ownership of
/proc/*/mem. Root can still see them all, as it can open all /proc/*/mem.
Notes:
svn path=/head/; revision=53278
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50471
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for users who are root, or in group wheel. This is useful on large timesharing
systems where a PS command can cause the system to grind to a halt. The
ability to get the information isn't diminished for those who really need the
additional detail (administrators.) Normal users won't see any difference unless
the processes are swapped out. The "really get it mode" is invoked by the
use of an additional flag in the command string "-f". New/old behavior is
selectable with a compile option.
PR: 5196
Submitted by: Matt Dillon <dillon@best.net>
Notes:
svn path=/head/; revision=31552
|
| |
|
|
|
|
|
|
|
| |
to the source code directory.
Submitted by: bde
Notes:
svn path=/head/; revision=28170
|
| |
|
|
| |
Notes:
svn path=/head/; revision=28053
|
| |
|
|
| |
Notes:
svn path=/head/; revision=22988
|
| |
|
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
Notes:
svn path=/head/; revision=21673
|
| |
|
|
| |
Notes:
svn path=/head/; revision=11779
|
| |
|
|
| |
Notes:
svn path=/head/; revision=7837
|
| |
|
|
|
|
|
| |
was breaking this before has been fixed.
Notes:
svn path=/head/; revision=7836
|
| |
|
|
| |
Notes:
svn path=/head/; revision=3044
|
| |
|
|
|
|
|
|
|
|
| |
that old `ps'es did. I'm not too thrilled about this, but I'm not
enough of an FS person to hack procfs so that /proc/xxx/mem is readable
by members of group `kmem'. If this is done, then `ps' can go back to
being set-gid kmem.
Notes:
svn path=/head/; revision=2032
|
|
|
Notes:
svn path=/head/; revision=1556
|