Date: Sat, 17 Feb 2018 06:56:19 +0000 From: Jamie Landeg-Jones <jamie@catflap.org> To: mike@karels.net, Cy.Schubert@cschubert.com Cc: arch@freebsd.org Subject: Re: ps output line length change Message-ID: <201802170656.w1H6uJh8026979@donotpassgo.dyslexicfish.net> In-Reply-To: <201802170203.w1H23ZTE023044@slippy.cwsent.com> References: <201802170203.w1H23ZTE023044@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Cy Schubert <Cy.Schubert@cschubert.com> wrote: > That's a tough one. Break Linux compatibility or break BSD > compatibility? > > Generally Linux users use ps -ef which we don't support and columns are > different so, Linux compatibility is... well just isn't. > > My vote is to revert and have an environment variable with defaults, > e.g., PS=--linux or something similar. I agree entirely. This change effectively changes the output data simply due to presence of a pipe. So, the output of "ps" could be somewhat different to "ps | cat".. (*) It's a total break of POLA. It's unnecessary (-ww already exists to achieve it) And I think it will actually make scripts more unreliable going forward... Which version of "ps" are we running? Do we "-ww" or not? Surely we want to remove ambiguity not add it. I know it's a weird one - I remember long long ago getting bitten by scripts that parsed "ps" getting seemingly unexplained truncation. But that's when I learnt how "ps" works, and that's when I learnt of "-ww" Now, if "ps" had never defaulted to tty-width truncation, then that would be fine, but changing how it determines to do so now would be awful, in my opinion. (*) I realise that piped output is often changed to remove control/colour attributes, and "ls" switches off column mode, but the former is a different situation, and the latter? Well, something we have to live with now, and it doesn't really affect the actual raw data that's displayed. Cheers, Jamie
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802170656.w1H6uJh8026979>