On Fri, Feb 17, 2023 at 01:49:59PM -0500, The Wanderer wrote:
> I can't speak to the new version, as I'm still running 3.3.17-7.1 on my
> machine - but I can at least note that the man page from that older
> version also explicitly says "a blank-separated or comma-separated list"
> in the description for the '-o' option, but the given command line (with
> a pipe for a separator) still works. (This may reflect only the same
> thing that you said, above.)
> 
> It's entirely possible that this was an intentional change, to bring
> things in line with the documentation, and/or even one required in order
> to be in line with some appropriate specification.

Hmm... fair point.  POSIX says:

       The application shall ensure that the format specification is a list of
       names  presented  as  a  single argument, <blank> or <comma>-separated.

So the behavior of ps in bullseye is an extension of the POSIX requirement,
and apparently only applies to the "AIX format specifiers", which are yet
another extension.

On bullseye:

unicorn:~$ ps -o '%U|%p|%a'
USER    |    PID|COMMAND
greg    |   1010|bash
greg    |2023595|ps -o %U|%p|%a
unicorn:~$ ps -o 'user|pid|args'
error: unknown user-defined format specifier "user|pid|args"
[...]

Nevertheless, this change definitely feels like a regression.  Scripts
that are relying on the bullseye behavior, with full output formatting
capability, will no longer work in bookworm.

I'm not using any such scripts, so I don't have anything to lose here,
but the OP might seriously want to get a bug report in, at least to
learn whether this is an intended regression, or an accidental one.

Reply via email to