[Bug 11971] New: ps output run together when PID is too wide

bugzilla at busybox.net bugzilla at busybox.net
Thu Jun 20 21:02:17 UTC 2019


            Bug ID: 11971
           Summary: ps output run together when PID is too wide
           Product: Busybox
           Version: 1.33.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: jsbarber60 at gmail.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

In the command "ps ax -o pid,args" the PID is run together with the next field
whenever the PID is longer than 5 characters.

Easy demonstration with alpine linux in a docker container:

$ docker run -it alpine:latest
/ # for n in $(seq 100000); do (:) ; done
/ # ps ax -o pid,args
    1 /bin/sh
100008ps ax -o pid,args

I also built the current master branch on my local ubuntu box and reproduced:
(Create processes to get PID above 100000, then...)

$ ./busybox ps ax -o pid,args
102096busybox ps ax -o pid,args

Standard: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html
-o  format
Write information according to the format specification given in format. This
is fully described in the STDOUT section. Multiple -o options can be specified;
the format specification shall be interpreted as the <space>-separated
concatenation of all the format option-arguments.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the busybox-cvs mailing list