aboutsummaryrefslogtreecommitdiff
path: root/ps.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-04-25 23:24:55 +0000
committerErik Andersen <andersen@codepoet.org>2000-04-25 23:24:55 +0000
commit227a59b05d6df9b4be5990915646249d6f548822 (patch)
tree36b29c39d4740003b9b77c098a634bac8a6dcb45 /ps.c
parentf93a95de6960b1d1977a934aafd3e9a8b8ea1765 (diff)
downloadbusybox-w32-227a59b05d6df9b4be5990915646249d6f548822.tar.gz
busybox-w32-227a59b05d6df9b4be5990915646249d6f548822.tar.bz2
busybox-w32-227a59b05d6df9b4be5990915646249d6f548822.zip
Several more updates
-Erik
Diffstat (limited to 'ps.c')
-rw-r--r--ps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ps.c b/ps.c
index 8d59700fd..f8cf33b25 100644
--- a/ps.c
+++ b/ps.c
@@ -163,13 +163,13 @@ extern int ps_main(int argc, char **argv)
163 if (*groupName == '\0') 163 if (*groupName == '\0')
164 sprintf(groupName, "%d", p.rgid); 164 sprintf(groupName, "%d", p.rgid);
165 165
166 len = fprintf(stdout, "%5d %-8s %-8s %c ", p.pid, uidName, groupName,
167 p.state);
168 sprintf(path, "/proc/%s/cmdline", entry->d_name); 166 sprintf(path, "/proc/%s/cmdline", entry->d_name);
169 file = fopen(path, "r"); 167 file = fopen(path, "r");
170 if (file == NULL) 168 if (file == NULL)
171 fatalError("Can't open %s: %s\n", path, strerror(errno)); 169 continue;
172 i = 0; 170 i = 0;
171 len = fprintf(stdout, "%5d %-8s %-8s %c ", p.pid, uidName, groupName,
172 p.state);
173 while (((c = getc(file)) != EOF) && (i < (terminal_width-len))) { 173 while (((c = getc(file)) != EOF) && (i < (terminal_width-len))) {
174 i++; 174 i++;
175 if (c == '\0') 175 if (c == '\0')