summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-06 02:31:31 +0000
committerMiles Bader <miles@gnu.org>1995-04-06 02:31:31 +0000
commit7234f47557602880baaaee8d75cfafc12476ce96 (patch)
tree21b40d04b4405aa59e394947df444667b2cb59aa /utils
parent3ac8d0025591062c29d48ce7649bbc35320ca2b9 (diff)
When processes are specified on the command line by PID, turn off all
filtering so that they don't disappear later.
Diffstat (limited to 'utils')
-rw-r--r--utils/ps.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/ps.c b/utils/ps.c
index f6149b21..ecdd8344 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -170,9 +170,6 @@ char *fmts[] =
"~PID ~Th# ~UID ~PPID ~PGRP ~Sess ~NTh ~VMem=vsize ~RSS=rsize ~%CPU ~User=utime ~System=stime ~Args"
};
-/* Required by `error' functions. */
-char *program_name;
-
void
main(int argc, char *argv[])
{
@@ -200,9 +197,14 @@ main(int argc, char *argv[])
err = proc_stat_list_add_pid(procset, pid);
if (err)
error(3, err, "%d: can't add process id", pid);
- }
- program_name = program_invocation_short_name;
+ /* If explicit processes are specified, we probably don't want to
+ filter them out later. This implicit turning off of filtering might
+ be confusing in the case where a login-collection or session is
+ specified along with some pids, but it's probably not worth worrying
+ about. */
+ filter_mask = 0;
+ }
err = ps_context_create(cur_proc, &context);
if (err)