[procps] Re: top buglets + misc

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 1 Mar 2012 12:28:21 -0600

Hi Craig et.al.

The attached tarball addresses the rcfile issues along with two other items.

Rather than a separate program or script to perform the rcfile conversion, I 
put the code in top itself.  Later, that logic can be easily generalized to 
also handle any number of future changes to new top's configuration file.

On Feb 27, 2012, at 4:00 PM, Craig Small wrote:
To me this would be an ideal list of things:

>  * Newer tops, ideally, should read older toprc with some sane

>    defaults for stuff that the older toprc doesn't cover.
>  * If newer tops cannot understand some component in an old toprc
>    they silently? ignore it.

Done.  And the only thing ignored is the Show_THREADS option which could never 
apply to just a single window.  It's now a command line only option.  See 
README.top for additional background on that awful hack.

>  * You can somehow specify what toprc to use. Either command line
>    or an option.
>  * My preference is its a command-line option because you can do things
>    with aliases then. This is what a lot of other programs do.

Users already have this capability either through a symlink or by way of 
specifying the directory in which to search for .toprc.  So something as simple 
as this works for both old and new top alike:
  !#/bin/sh
  export HOME=. && top

>  * If you write out a toprc on a new top then old top probably won't
>    like that, but then you shouldn't of done that in the first place.

I even included a warning when a user is about to loose an old style rcfile via 
the 'W' command.  If the user doesn't answer 'y', no problem.  New top will 
just convert the old style file again when restarted.

Regards,
Jim



Other related posts: