summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelena Deckelmann <selenamarie@gmail.com>2008-09-22 18:21:39 -0700
committerSelena Deckelmann <selenamarie@gmail.com>2008-09-22 18:21:39 -0700
commita28ee1e1282e9a18fec6d9e1dca8e5c44ed8630a (patch)
tree8b1e3f246a0d77efa985d4953b5e19018f799dbe
parentecff23e84260bafbc7965bb173ce04b94c0f6f7e (diff)
fixed process output to print command name without arguments
-rw-r--r--machine/m_macosx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/machine/m_macosx.c b/machine/m_macosx.c
index 97a884c..d5fd9eb 100644
--- a/machine/m_macosx.c
+++ b/machine/m_macosx.c
@@ -420,6 +420,7 @@ format_next_process(caddr_t handle, char *(*getuserid) ())
register long cputime;
register double pct;
struct handle *hp;
+ char *command; /* text outputted to describe the command */
/*
* we need to keep track of the next proc structure.
@@ -447,6 +448,7 @@ format_next_process(caddr_t handle, char *(*getuserid) ())
comm[COMSIZ - 2] = '\0';
strncat(comm, ">", COMSIZ - 1);
comm[COMSIZ - 1] = '\0';
+ command = comm;
}
/*
@@ -545,7 +547,7 @@ format_next_process(caddr_t handle, char *(*getuserid) ())
100.0 * TP(pp, resident_size) / maxmem,
/* 100.0 * weighted_cpu(pct, (RP(pp, user_time).seconds + RP(pp, system_time).seconds)), */
100.0 * pct,
- stringPtr);
+ command);
return (fmt);
}