summaryrefslogtreecommitdiffstats
path: root/usr.bin/top
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-08-04 14:10:48 +0000
committerdes <des@FreeBSD.org>1998-08-04 14:10:48 +0000
commite8ccb4f081316fdb1146a5b00fc424fd5b6a7649 (patch)
tree7f243251c25e7624a0b4b77106b75aeda0252746 /usr.bin/top
parente0fcaa07d2408a1d03d13f511c35e030b08813cc (diff)
downloadFreeBSD-src-e8ccb4f081316fdb1146a5b00fc424fd5b6a7649.zip
FreeBSD-src-e8ccb4f081316fdb1146a5b00fc424fd5b6a7649.tar.gz
Add -t option ('t' in interactive mode) to make top(1) ignore itself.
Attempts to contact the author of top(1) (William LeFebvre) have so far been unsuccessful. PR: 7253 Submitted by: Yours Truly
Diffstat (limited to 'usr.bin/top')
-rw-r--r--usr.bin/top/machine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 7d22e25..8667149 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -17,7 +17,7 @@
* Steven Wallace <swallace@freebsd.org>
* Wolfram Schneider <wosch@FreeBSD.org>
*
- * $Id: machine.c,v 1.11 1998/06/21 18:00:34 dt Exp $
+ * $Id: machine.c,v 1.12 1998/07/27 12:21:58 wosch Exp $
*/
@@ -458,6 +458,7 @@ int (*compare)();
/* these are copied out of sel for speed */
int show_idle;
+ int show_self;
int show_system;
int show_uid;
int show_command;
@@ -476,6 +477,7 @@ int (*compare)();
/* set up flags which define what we are going to select */
show_idle = sel->idle;
+ show_self = sel->self;
show_system = sel->system;
show_uid = sel->uid != -1;
show_command = sel->command != NULL;
@@ -494,6 +496,7 @@ int (*compare)();
* processes---these get ignored unless show_sysprocs is set.
*/
if (PP(pp, p_stat) != 0 &&
+ (show_self != PP(pp, p_pid)) &&
(show_system || ((PP(pp, p_flag) & P_SYSTEM) == 0)))
{
total_procs++;
OpenPOWER on IntegriCloud