> It segfaults when the number of processes is greater than 64. (63?)
> It's a bug in ps.
Correct, it's an 'of-by-one' error -- try this one:
== snip ==
diff -ur procps-1.01/ps.c procps-1.01-ray/ps.c
--- procps-1.01/ps.c Wed Jun 12 14:39:36 1996
+++ procps-1.01-ray/ps.c Tue Oct 1 18:58:31 1996
@@ -515,7 +515,7 @@
node = (struct tree_node *)
malloc(sizeof(struct tree_node) * maxnodes);
}
- if (nodes > maxnodes) {
+ if (nodes >= maxnodes) {
maxnodes *= 2;
node = (struct tree_node *)
realloc(node, sizeof(struct tree_node) * maxnodes);
== snip ==
Regards,
-- Raymund Will ray@lst.de