Deprecating ps(1)s -w switch

Ivan Radovanovic rivanr at gmail.com
Tue Aug 25 21:24:06 UTC 2009


Alex Goncharov napisa:
> ,--- You/Ivan (Tue, 25 Aug 2009 22:02:56 +0200) ----*
> | > Feel free to take a crack at this and send the results to the list for
> | > review. Improving the documentation is always a worthy goal.
> | >   
> | I would do that for sure if everyone thinks this ps behavior is 
> | something that should be kept at current state even if it could be made 
> | better
> `---------------------------------------------------*
>
> Don't know how you are going to find about "everyone", but I, for one,
> think that modifying the established tool's behavior in the proposed
> manner is an utterly bad idea.
>
> Use shell aliases, functions and scripts wrapped around the primary
> tool to get the behavior you like -- let others stick with their
> established habits and wrappers.
>
> Improving the documentation would be good, OTOH.
>
> Thanks,
>
> -- Alex -- alex-goncharov at comcast.net --
>   
I guess voting is going against me, so I would probably need to update 
that documentation :-)
Please understand that my idea is to make tool behave as expected from 
its description - for example ls also formats its output according to 
terminal, but when you redirect it then it doesn't care about terminal 
(try "ls" and "ls | less"), that is what in the first place made me 
think that ps would behave in the same way (and btw, I still think that 
all non-interactive tools behave that way). And I also think that if we 
can make learning FreeBSD even little less difficult then we should do that.

My point is if you are making tool for listing processes what you want 
is to LIST process (first, and most important), and later (if at all) to 
make that pretty formatted, after all it is unix philosophy to have 
small programs that do exactly one thing and that do it right - I think 
that philosophy is broken (because of historical reasons) with current 
implementation of ps

On the other hand fixing ps's behavior in the proposed manner will for 
sure brake some scripts that depend on it, but if scripts depend on 
formatting behavior then those scripts are used only to display some 
information on the terminal and they would be easily spotted and 
corrected (are there scripts like that in the system - can someone point 
out and say "Hey XXX will be broken, and that will further brake YYY and 
so on"? Because I am beginning to think that maybe there is far less 
things depending on this behavior than expected... )

Ivan

P.S.
I am giving up of trying to explain my reasoning any more, I think I 
gave enough reasons for everyone to understand my motivation (although 
of course everyone has the right not to agree with me). I didn't want to 
offend anyone in this short discussion and if someone feels that way 
then I am truly sorry. Any pointers on how to update manual page for ps 
would be greatly appreciated, as well as some mail agreeing with my 
standpoint :-)



More information about the freebsd-hackers mailing list