diff options
author | phk <phk@FreeBSD.org> | 1999-11-16 20:31:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-11-16 20:31:58 +0000 |
commit | cc6b664e2eb821b39837e7bb980e5ee87e201491 (patch) | |
tree | 65eeb4add32e588f36f28e2a0bb819c17a67ff70 /bin/ps/ps.c | |
parent | 47e5f46c7642e6d8e2ed20c8afca59596d3c2dc1 (diff) | |
download | FreeBSD-src-cc6b664e2eb821b39837e7bb980e5ee87e201491.zip FreeBSD-src-cc6b664e2eb821b39837e7bb980e5ee87e201491.tar.gz |
Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.
To disable this facility and revert to previous behaviour:
sysctl -w kern.ps_arg_cache_limit=0
For full details see the current@FreeBSD.org mail-archives.
Diffstat (limited to 'bin/ps/ps.c')
-rw-r--r-- | bin/ps/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 305d4c7..72828bb 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -520,7 +520,7 @@ saveuser(ki) /* * save arguments if needed */ - if (needcomm && UREADOK(ki)) { + if (needcomm && (UREADOK(ki) || (KI_PROC(ki)->p_args != NULL))) { ki->ki_args = fmt(kvm_getargv, ki, KI_PROC(ki)->p_comm, MAXCOMLEN); } else if (needcomm) { |