"Albert rewrote ps for full Unix98 and BSD support, along with some ugly hacks for obsolete and foreign syntax."
"Albert rewrote ps for full Unix98 and BSD support, along with some ugly hacks for obsolete and foreign syntax."
Something like "ps -axu" will fail the UNIX/POSIX/SysV parsing, then restart in a pure BSD mode with the "-" ignored. Something like "ps -aux" will too, unless there is a user named "x". There is also a PS_PERSONALITY environment variable to force the parser to act in a particular way.
It was needed to transition people over to a standards-compliant syntax. I couldn't support all the old syntax. Prior to 1997, something like "ps -ef" would parse as "ps ef" does today, which is not standards-compliant. People were unwilling to just switch over without the compatibility hacks. There were instances of things like "ps -aux" all over the place, including in people's private shell scripts. People couldn't resist typing it.
I got pushback just for including the warning on stderr when somebody caused the parser to kick in to compatibility mode.