summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-03-21 03:02:47 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-03-21 03:02:47 +0000
commit698abd6eb72d09be79c0480bde3476af0f6715a1 (patch)
tree2d3b7c57a91c4783541fbb2ce63023088c3e2d2a /utils
parent709978ff4f2840da7174771fb3936845d3b72264 (diff)
(program_name): New variable.
(main): Don't set program_invocation_short_name (the library does it for us). Do set program_name.
Diffstat (limited to 'utils')
-rw-r--r--utils/ps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/ps.c b/utils/ps.c
index 9464ed42..bb006043 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -167,6 +167,9 @@ 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[])
{
@@ -183,7 +186,7 @@ main(int argc, char *argv[])
bool sort_reverse = FALSE, print_heading = TRUE, squash_bogus_fields = TRUE;
bool show_threads = FALSE;
- program_invocation_short_name = argv[0];
+ program_name = program_invocation_short_name;
err = ps_context_create(cur_proc, &context);
if (err)