From 698abd6eb72d09be79c0480bde3476af0f6715a1 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 21 Mar 1995 03:02:47 +0000 Subject: (program_name): New variable. (main): Don't set program_invocation_short_name (the library does it for us). Do set program_name. --- utils/ps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3