]> granicus.if.org Git - procps-ng/commit
ps: Stop crash if using test fields
authorCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 06:50:17 +0000 (17:50 +1100)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Dec 2020 06:50:17 +0000 (17:50 +1100)
commitbed6074531e044dd49760f5004a92229dc13e3e7
treeae1512ea3274f2004056bf1f8dd74c47b3c7a009
parent048820fde3130a995f6a0d8f8747550100dbd50b
ps: Stop crash if using test fields

I'm not sure if anyone actually uses these things, but if you
selected test fields on the command line ps would crash.

$ ps/pscommand -o _left
Signal 11 (SEGV) caught by pscommand (3.3.11.877-0488).
/home/csmall/Projects/procps/procps/ps/.libs/pscommand:ps/display.c:66: please report this bug
Segmentation fault

Anyway, it doesn't now:
$ ps/pscommand -o pid,_left,_left2,_right,_unlimited 1
    PID LLLLLLLL L2L2L2L2 RRRRRRRRRRR U
      1 tty7     3270/tty4      59:59 [123456789-12345] <defunct>
ps/output.c