Bug 454370
Summary: | headers format parsing wrong (e.g. ps -o pid=,cmd=) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Mikel Ward <mikel> |
Component: | procps | Assignee: | Daniel Novotny <dnovotny> |
Status: | CLOSED WONTFIX | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 4.6 | CC: | albert |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-07-21 07:14:55 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mikel Ward
2008-07-08 01:42:18 UTC
Ew. They changed the behavior in the latest POSIX standard. When they say "argument", they now mean everything in the argument to -o: APPLICATION USAGE There is no special quoting mechanism for header text. The header text is the rest of the argument. If multiple header changes are needed, multiple -o options can be used, such as: ps -o "user=User Name" -o pid=Process\ ID This must be changed in the upstream version first and definitely won't get there from RHEL. No API changes should appear in stable releases. $ ps -o pid=,cmd= ,cmd= 6496 6532 $ PS_PERSONALITY=linux ps -o pid=,cmd= 6496 bash 6533 ps -o pid=,cmd= $ PS_PERSONALITY=posix ps -o pid=,cmd= ,cmd= 6496 6534 The default personality is POSIX (insane) unless you use a non-POSIX option. I encourage you to point out to the POSIX committee that nobody likes the insane POSIX parsing. They have a mailing list, austin-group-l if I remember right, where you can send edits to the standard. The comma should just be unavailable; quoting is certainly not required. (if they insist, use ",," to put a common in a header) Probably you'll get better luck making "," after "=" have undefined behavior, but a few years later somebody may see that as an omission and restore the insanity. |