William LeFebvre <phil@rice.ARPA> (11/14/84)
A short while ago, I sent out a shell archive file for a top processes display program called "top". Since then, a bug has been discovered that, in certain cases, causes "top" to segmentation fault. Here is a shell file that changes "top" to fix this bug, upgrading it from version 1.4 to version 1.5. Thanks to Prentiss Riddle at ut-sally for pointing this problem out to me. Extract the shell file at the end of this message and place it in the same directory that contains the "top" distribution sent earlier. Then, run the shell file with your favorite shell. It will automatically apply the changes to the appropriate files (in this case, "Changes" and "top.c"), so make sure that you have the original versions of these files in that directory. Once you have done this, remake "top" with "make". William LeFebvre Department of Computer Science Rice University <phil@Rice.arpa> ------------------------------- CUT HERE ------------------------------- echo 'Updating "top", from version 1.4 to 1.5:' echo 'Extracting 1.5diff-Changes...' sed 's/^X//' > 1.5diff-Changes << '/' X0a XTue Nov 13 1984 - wnl (1.5) X If the number of displayable processes ("active_procs") was less X than the number of requested processes ("topn"), top would X segmentation fault. This bug has been fixed. Thanks to Prentiss X Riddle at ut-sally for pointing out the existence of this bug. X X. Xw Xq / echo 'Extracting 1.5diff-top.c...' sed 's/^X//' > 1.5diff-top.c << '/' X389c X procs_to_show = topn > active_procs ? active_procs : topn; X for (prefp = pref, i = 0; i < procs_to_show; prefp++, i++) X. X150a X int procs_to_show; X. X5c X * Version 1.5 X. Xw Xq / echo 'Updating Changes...' ed Changes <1.5diff-Changes echo 'Updating top.c...' ed top.c <1.5diff-top.c echo 'Cleaning up...' rm 1.5diff-Changes rm 1.5diff-top.c echo '"top" update complete.'